Jüri Vain Dept. of Computer Science Tallinn University of Technology J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 1.

Slides:



Advertisements
Similar presentations
Model Checking Lecture 4. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Advertisements

Chapter 5: Tree Constructions
Algorithms (and Datastructures) Lecture 3 MAS 714 part 2 Hartmut Klauck.
Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
Planning based on Model Checking Dept. of Information Systems and Applied CS Bamberg University Seminar Paper Svetlana Balinova.
Michael Alves, Patrick Dugan, Robert Daniels, Carlos Vicuna
an incremental version of A*
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
Efficient Reachability Analysis for Verification of Asynchronous Systems Nishant Sinha.
PSWLAB S PIN Search Algorithm from “THE SPIN MODEL CHECKER” by G Holzmann Presented by Hong,Shin 9 th Nov SPIN Search Algorithm.
Planning under Uncertainty
Weizmann Institute Tuning SAT-checkers for Bounded Model-Checking A bounded guided tour Ofer Shtrichman Weizmann Institute & IBM (HRL)
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt.
Tirgul 12 Algorithm for Single-Source-Shortest-Paths (s-s-s-p) Problem Application of s-s-s-p for Solving a System of Difference Constraints.
Doctoral course ’Advanced topics in Embedded Systems’. Lyngby'08 Synthesis of Test Purpose Directed Reactive Planning Tester for Nondeterministic Systems.
FunState – An Internal Design Representation for Codesign A model that enables representations of different types of system components. Mixture of functional.
CSE 780 Algorithms Advanced Algorithms Graph Algorithms Representations BFS.
Randomized Planning for Short Inspection Paths Tim Danner Lydia E. Kavraki Department of Computer Science Rice University.
25/06/2015Marius Mikucionis, AAU SSE1/22 Principles and Methods of Testing Finite State Machines – A Survey David Lee, Senior Member, IEEE and Mihalis.
Tirgul 13. Unweighted Graphs Wishful Thinking – you decide to go to work on your sun-tan in ‘ Hatzuk ’ beach in Tel-Aviv. Therefore, you take your swimming.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
1 Efficient Discovery of Conserved Patterns Using a Pattern Graph Inge Jonassen Pattern Discovery Arwa Zabian 13/07/2015.
Backtracking.
Software Testing and QA Theory and Practice (Chapter 4: Control Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 9 Functional Testing
Dijkstra's algorithm.
Timed UML State Machines Ognyana Hristova Tutor: Priv.-Doz. Dr. Thomas Noll June, 2007.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Graph Algorithms Shortest-Path.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
CDC related research at the Dept. of Computer Science TUT Jüri Vain CDC Workshop - Tallinn, Jan , 2008.
Scientific Computing By: Fatima Hallak To: Dr. Guy Tel-Zur.
Agenda Introduction Overview of White-box testing Basis path testing
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
Conformance Test Experiments for Distributed Real-Time Systems Rachel Cardell-Oliver Complex Systems Group Department of Computer Science & Software Engineering.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Verification & Validation By: Amir Masoud Gharehbaghi
Coevolutionary Automated Software Correction Josh Wilkerson PhD Candidate in Computer Science Missouri S&T.
Author: Haoyu Song, Murali Kodialam, Fang Hao and T.V. Lakshman Publisher/Conf. : IEEE International Conference on Network Protocols (ICNP), 2009 Speaker:
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
Quality Assurance in the Presence of Variability Kim Lauenroth, Andreas Metzger, Klaus Pohl Institute for Computer Science and Business Information Systems.
Winter 2007SEG2101 Chapter 121 Chapter 12 Verification and Validation.
Suppose G = (V, E) is a directed network. Each edge (i,j) in E has an associated ‘length’ c ij (cost, time, distance, …). Determine a path of shortest.
Solving problems by searching A I C h a p t e r 3.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Reachability Testing of Concurrent Programs1 Reachability Testing of Concurrent Programs Richard Carver, GMU Yu Lei, UTA.
Symbolic Model Checking of Software Nishant Sinha with Edmund Clarke, Flavio Lerda, Michael Theobald Carnegie Mellon University.
DECISION 1. How do you do a Bubble Sort? Bubble Sort:  You compare adjacent items in a list;  If they are in order, leave them.  If they are not in.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
CS223: Software Engineering Lecture 26: Software Testing.
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
Teooriapäevad, Vanaõue, Sept Synthesis of Test Purpose Directed Reactive Planning Tester for Nondeterministic Systems 1 Jüri Vain, Kullo Raiend,
Solving problems by searching
Software Testing.
Software Testing.
Control Flow Testing Handouts
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
New Characterizations in Turnstile Streams with Applications
Software Engineering (CSI 321)
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Outline of the Chapter Basic Idea Outline of Control Flow Testing
Lectures on Network Flows
Artificial Intelligence
Software Testing (Lecture 11-a)
Searching for Solutions
Artificial Intelligence
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Presentation transcript:

Jüri Vain Dept. of Computer Science Tallinn University of Technology J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

2 Vain, Jüri; Kääramees, Marko; Markvardt, Maili Online testing of nondeterministic systems with reactive planning tester. In: Petre, L.; Sere, K.; Troubitsyna, E. (Eds.). Dependability and Computer Engineering : Concepts for Software-Intensive Systems. Hershey, PA: IGI Global (2012), pages

Outline  Preliminaries Model-Based Testing Online testing  Reactive Planning Tester (RPT)  Synthesis of the RPT  Performance issues  Test execution environment dTron  Demo J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

What is testing for?  to check the quality (functionality, reliability, performance, …) of an (software) object -by performing experiments -in a controlled way In avg errors per 1000 LOC % of development time and cost in software 4 J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012

What is a Test? Software under Test (SUT) Test Data Output Test Cases Correct result? Oracle 5 J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012

6 Model- Based Testing (typically)

Specifics of testing embedded systems J.Vain “...Reactive Planning Testing...”Abo, Feb 3, – non-determinism – partial observability – RT constraints – dependability  test coverage issues How to address them in testing? Real environment in the loop!

Option 1: Offline vs Online testing  Offline testing Open “control” loop Test is not adaptive to outputs or timing of SUT Test planning – result analysis loop is long  Online testing Flexible, test control is based on SUT feedback One test covers usually many test cases J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Online testing  Group of test generation and execution algorithms that compute successive stimuli at runtime directed by  the test purpose and  the observed outputs of the SUT J.Vain “...Reactive Planning Testing...”Abo, Feb 3, TesterSUT

Online testing  Advantages: The state-space explosion problem is reduced because only a limited part of the state-space needs to be kept track of at any point in time.  Drawbacks: Exhaustive planning is diffcult due to the limitations of the available computational resources at the time of test execution. J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Option 2: Test scripting vs model-based generation J.Vain “...Reactive Planning Testing...”Abo, Feb 3,  Scripting:  does not need SUT modelling+  sensitive to human errors-  inflexible, needs rewriting even with small changes of SUT specs-  hard to achieve test coverage-  Model-based generation:  considerable SUT modelling effort -  correctness of tests is verifiable+  easy to modify and regenerate+  clear characteristics of coverage+

Model-Based Testing  Given Model of the SUT specification System Under Test (SUT), The test goal (in terms of spec. model elements)  Find If the SUT conforms to the specification in terms expressed in the test goal. J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 NEEDED! - Sufficiently rich modelling formalism, - Supporting tool set. 12

Model-Based Testing  We assume formal specs as: UML State Charts Extended Finite State Machines MSC OCL  etc. UPTA -Timed Automata (timing, parallelism, test data) J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

UPPAAL Tools  TIGA: Timed games (reachability and safety)  CORA: Cost Optimal reachability from priced TA  TRON: Testing Real-time Online Uppaal Model- checker: Efficient reachability analysis of network of timed automata (TA) Uppaal- CORA Uppaal- TIGA Uppaal- TRON … 14

Test Gene- rator tool click? x:=0 click? x<2 x>=2 DBLclick! input Online Model-Based Testing fail pass Test execution tool Test execution tool Adaptor Model Test Generator tool output Correctness Relation Selection & optimization Test generated and executed event-by-event (randomly) A.K.A on-the-fly testing Implementation Under Test input output 15

”Relativized Real-Time i/o conformance” Relation Spec = UppAal Timed Automata Network: Env || IUT Timed Trace: i 1.2½.o 1.3.o 2.19.i 2. 5.i 3 Expected system reactionInput event ordering 16J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 Online MBT architecture: UppAal-TRON [

Bottleneck of online MBT: planning Spectrum of planning methods  Random walk (RW): select test stimuli in random inefficient - based on random exploration of the state space leads to test cases that are unreasonably long may leave the test purpose unachieved  RW with reinforcement learning (anti-ant) the exploration is guided by some reward function   Exploration with exhaustive planning MC provides possibly an optimal witness trace the size of the model is critical in explicit state MC state explosion in "combination lock" or deep loop models 17 J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012

Bottleneck of online MBT: planning Spectrum of planning methods  Random walk (RW): select test stimuli in random inefficient - based on random exploration of the state space leads to test cases that are unreasonably long may leave the test purpose unachieved  RW with reinforcement learning (anti-ant) the exploration is guided by reward function   Exploration with exhaustive planning MC provides possibly an optimal witness trace the size of the model is critical in explicit state MC state explosion in "combination lock" or deep loop models ??? 18 J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 Full space 1 step ahead Zero planning

Bottleneck of online MBT: planning Spectrum of planning methods  Random walk (RW): select test stimuli in random inefficient - random exploration of the state space test cases that are unreasonably long may leave the test purpose unachieved  RW with reinforcement learning (anti-ant) the exploration is guided by some reward function   Exploration with exhaustive planning MC provides possibly an optimal witness trace the size of the model is critical in explicit state MC state explosion in "combination lock" or deep loop models Planning with adaptive horizon! 19 J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 Full space 1 step ahead Zero planning

Reactive Planning in a Nutshell (1)  Instead of a complete plan, only a set of decision rules is derived  The rules direct the system towards the test goal.  Based on current situation evaluation just one subsequent input is computed at a time.  Planning horizon is adjusable J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Reactive Planning: Planning cycle  Identify current state of SUT: Observe the output (or history) of the SUT  Pick the next move: Select one from unsatisfied test (sub-)goals G i  Compute the best strategy for G i : Gain function guides the exploration of the model (choose the transition with the shortest path to the (sub-)goal G i ) J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 Reactive Planning Tester in a Nutshell (2) State model of the IUT Test goal Reactive Planning Tester (RPT) model Reachability Analysis Reactive Planning Tester (RPT) implementation SUT Offline phaseOnline phase Stimuli / responses RPT is another state model 22 RPT autonomously generates stimuli to reach the goal

Constructing the RPT model J.Vain “...Reactive Planning Testing...”Abo, Feb 3, Model of SUT Test goal Model of RPT Test strategy parameters: -planning horizon - timeouts Test strategy parameters: -planning horizon - timeouts Synthesis of RPT Extraction of the control strcture Constructing gain guards (GG) Constructing gain functions Reduction of GG

RPT: Key Assumptions  Testing is guided by the (EFSM) model of the tester and the test goal.  Decision rules of reactive planning are encoded in the guards of the transitions of the tester model.  The SUT model is presented as an output observable nondeterministic EFSM in which all paths are feasible 1.  1 - A. Y. Duale and M. U. Uyar. A method enabling feasible conformance test sequence generation for EFSM models. IEEE Trans. Comput.,53(5):614–627,2004. J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Example: Nondeterministic FSM s2s2 s3s3 e 6 : i 6 /o 6 e 7 : i 7 /o 7 s1s1 e 0 : i 0 /o 0 e 1 : i 0 /o 1 e 2 : i 2 /o 2 e 3 : i 3 /o 3 e 4 : i 3 /o 4 e 5 : i 5 /o 5 i 0 and i 3 are output observable nondeterministic inputs J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Encoding the Test Goal in SUT Model  Trap - a boolean variable assignment attached to the transitions of the IUT model  A trap variable is initially set to false.  The trap update functions are executed (set to true) when the transition is visited. J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Goal directed testing: The power of traps Several goals can be expressed all/selected transitions transition sequences (traps with reference to other traps) advanced goals using auxiliary variables, consequent transitions, repeated pass, … traps with 1st order predicates data variables Properties not expressible by traps Assertions/invariants – always/never properties The model specifies only the allowed behaviours Åbo Akademi University, Dec 2011

Add Test Purpose s2s2 s3s3 e 6 : i 6 /o 6, t 6 =true e 7 : i 7 /o 7, t 7 =true s1s1 e 0 : i 0 /o 0 t 0 =true e 1 : i 0 /o 1, t 1 =true e 2 : i 2 /o 2, t 2 =true e 3 : i 3 /o 3, t 3 =true e 4 : i 3 /o 4, t 4 =true e 5 : i 5 /o 5, t 5 =true bool t 0 = false;... bool t 7 = false; J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 Example: Adding the Test Goal s2s2 s3s3 e 6 : i 6 /o 6, t 6 =true e 7 : i 7 /o 7, t 7 =true s1s1 s1s1 e 0 : i 0 /o 0 t 0 =true e 1 : i 0 /o 1, t 1 =true e 2 : i 2 /o 2, t 2 =true e 3 : i 3 /o 3, t 3 =true e 4 : i 3 /o 4, t 4 =true e 5 : i 5 /o 5, t 5 =true Initial values: bool t 0 = false;... bool t 7 = false; Trap variables are initially set to false Trap update functions are executed (set to true) when the transition is visited Test goal is defined by trap variables t i attached to transitions 29

Model of the tester  Generated from the SUT model decorated with test purpose  Transition guards encode the rules of online planning  2 types of tester states: active – tester controls the next move passive – SUT controls the next move  2 types of transitions: Observable – source state is a passive state (guard  true), Controllable – source state is an active state (guard  p S /\ p T where p S – guard of the SUT transition; p T – gain guard) The gain guard (defined on trap variables) must ensure that only the outgoing edges with maximum gain are enabled in the given state. J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Construction of the Tester Sceleton s2s2 s3s3 e 6 : i 6 /o 6, t 6 =true e 7 : i 7 /o 7, t 7 =true s1s1 e 0 : i 0 /o 0 t 0 =true e 1 : i 0 /o 1, t 1 =true e 2 : i 2 /o 2, t 2 =true e 3 : i 3 /o 3, t 3 =true e 4 : i 3 /o 4, t 4 =true e 5 : i 5 /o 5, t 5 =true s1s1 sasa s2s2 sbsb scsc s3s3 sdsd sese sfsf J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 States:Transitions: - active - observable - passive - controllable 31

Add IO and Gain Guards s1s1 s4s4 s2s2 s5s5 s6s6 s3s3 s6s6 s9s9 s7s7 e o 0 : o 0 /t 0 =true e o 1 : o 1 /t 1 =true e c 01 : [p c 01 (T)] -/i 0 e o 2 : o 2 /t 2 =true e o 7 : o 7 /t 7 =true e c 2 : [p c 2 (T)] -/i 2 e c 34 : [p c 34 (T)] -/i 3 e o 3 : o 3 /t 3 =true e o 6 : o 6 /t 6 =true e c 6 : [p c 6 (T)] -/i 6 e c 7 : [p c 7 (T)] -/i 7 e c 5 : [p c 5 (T)] -/i 5 e o 5 : o 5 /t 5 =true J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Constructing the gain guards (GG): intuition  GG must guarantee that each transition enabled by GG is a prefix of some locally optimal (w.r.t. test purpose) path; tester should terminate after the test goal is reached or all unvisited traps are unreachable from the current state; to have a quantitative measure of the gain of executing any transition e we define a gain function g e that returns a distance weighted sum of unsatisfied traps that are reachable along e. J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Constructing Gain Guards: intuition J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 Observed current state Alternative choices... tr i tr j tr k... Planning cones to be covered for decision making 34

Constructing Gain Guards: intuition J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 tr i tr j tr k Alternative continuation choices... g e (tr i,T )... g e (tr j,T ) Gain functions characterize planning options 35 Current state

Constructing the gain guards: properties of gain functions  g e = 0, if it is useless to fire the transition e from the current state with the current variable bindings;  g e > 0, if fireing the transition e from the current state with the current variable bindings visits or leads closer to at least one unvisited trap;  g ei > g ej for transitions e i and e j with the same source state, if taking the transition e i leads to unvisited traps with smaller distance than taking the transition e j ;  Having gain function g e with given properties define GG: p T  (g e = max k g ek )  g e > 0 J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Constructing the Gain Functions: shortest path trees  Reachability problem of trap labelled transitions can be reduced to single-source shortest path problem 1.  Arguments of the gain function g e are then the shortest path tree TR e with root node e V T – vector of trap variables  To construct TR e we create a dual graph G = (V D,E D ) of the tester control graph M T where the vertices V D of G correspond to the transitions of the M T, the edges E D of G represent the pairs of consequtive transitions sharing a state in M T (2-switches) 1 - Fredman & Tarjan 1987O(E + V log V)Fredman & Tarjan 1987 J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Constructing the Gain Guards: shortest path tree (example) The dual graph of the tester modelThe shortest-paths tree (left) and the reduced shortest-paths tree (right) from the transition e c 01 J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Constructing the gain guards: gain function (1)  Represent the reduced tree TR(e i, G) as a set of elementary sub-trees each specified by the production i  j{1,..n} j  Rewrite the right-hand sides of the productions as arithmetic terms: (3) t i - trap variable t i lifted to type N, c - constant for rescaling the numerical value of the gain function, d( 0, i ) the distance between vertices 0 and i, where l - the number of hyper-edges on the path between 0 and i w j – weight of j-th hyperedge J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Constructing the gain guards: gain function (2)  For each symbol i denoting a leaf vertex in TR(e,G) define a production rule (4)  Apply the production rules (3) and (4) starting from the root symbol 0 of TR(e,G) until all non- terminal symbols i are substituted with the terms that include only terminal symbols t i and d( 0, i ) J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Example: Gain Functions J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Example: Gain Guards J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 Example: Construction of the Tester Structure s2s2 s3s3 e 6 : i 6 /o 6, t 6 =true e 7 : i 7 /o 7, t 7 =true s1s1 e 0 : i 0 /o 0 t 0 =true e 1 : i 0 /o 1, t 1 =true e 2 : i 2 /o 2, t 2 =true e 3 : i 3 /o 3, t 3 =true e 4 : i 3 /o 4, t 4 =true e 5 : i 5 /o 5, t 5 =true s1s1 s4s4 s2s2 s5s5 s6s6 s3s3 s6s6 s9s9 s7s7 e o 0 : o 0 /t 0 =true e o 1 : o 1 /t 1 =true e c 01 : [p c 01 (T)] -/i 0 e o 2 : o 2 /t 2 =true e o 7 : o 7 /t 7 =true e c 2 : [p c 2 (T)] -/i 2 e c 34 : [p c 34 (T)] -/i 3 e o 3 : o 3 /t 3 =true e o 6 : o 6 /t 6 =true e c 6 : [p c 6 (T)] -/i 6 e c 7 : [p c 7 (T)] -/i 7 e c 5 : [p c 5 (T)] -/i 5 e o 5 : o 5 /t 5 =true e o 4 : o 4 /t 4 =true The gain guards guarantee that only the outgoing edges with maximum gain are enabled in the given state 43

Complexity of constructing and running the tester  The complexity of the synthesis of the reactive planning tester is determined by the complexity of constructing the gain functions.  For each gain function the cost of finding the TR e by breadth-first- search is O(|V D | + |E D |) [Cormen], where |V D | = |E T | - number of transitions of M T |E D | - number of transition pairs of M T (is bounded by |E S | 2 )  For all controllable transitions of the M T the upper bound of the complexity of the computations of the gain functions is O(|E S | 3 ).  At runtime each choice by the tester takes O(|E S | 2 ) arithmetic operations to evaluate the gain functions J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

Performance of reactive planning J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 Test Goal: All Transitions Test Goal: Selected Transition 45

J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 Experiments: Case Study: Model of the IUT Model of Feeder Box Controller power management (31 states, 73 transitions) 46

Test environment of the FBCU J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

How to plan in large models? Test goal: all transitionsTest goal: single transition J.Vain “...Reactive Planning Testing...”Abo, Feb 3, Average lengths of the test sequences Adjustable planning horizon Dependancy between horizon and test length Horizon saturation point

Shaping RPT planning cones (i) J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 tr i tr j tr k Decision point Alternative choices In online-testing decision time must be strictly bounded!... g e (tr i,T )... g e (tr j,T ) Gain functions 49

Shaping RPT planning cones (ii) J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 tr i tr j tr k Decision point Alternative choices Decision time strictly bounded! Prune the cone!... g e (tr i,T )... g e (tr j,T ) Gain functions Horizon h Different ways for defining h, and ‘visibility’ depending on depth of tree. Fully visible Partially visible 50

Average lengths of test sequences in the experiments J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012 Horizon All transitions test coverageSingle transition test coverage Planning with horizon anti-antrandom choiceanti-antrandom choice ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± 8672 ± ± ± ± 5773 ± ± ± ± 5879 ± 3086 ± ± ± 3841 ± 1574 ± ± ± 4434 ± 848 ± ± ± 4034 ± 940 ± ± ± 4225 ± 426 ± ± ± 5223 ± 224 ± ± ± 3222 ± 221 ± ± ± 4721 ± ± ± 2921 ± ± ± 4321 ± 1 51

Average time spent for online planning of the next step J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

J.Vain “...Reactive Planning Testing...”Abo, Feb 3,  How to generate test data?

Example: RPT synthesis for INRES protocol J.Vain “...Reactive Planning Testing...”Abo, Feb 3, Model of the SUT local component

Example: RPT synthesis for INRES protocol Local SUT component model RPT model Timeout! Off! LowICONreq? DR? CC? ? AK? 55J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012

Online planning constraints for the RPT J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

How to derive data constraints?  For all transitions t(s i,.) of state s i generate reduced reachability tree RRT i s.t. transition t(s i,.) is a root and the trap labeled transitions the terminal nodes of the RRT i.  Compute data constraint for each path  j of RRT i  use wp-algorithm (starting from trap node) for pairs of neigbbour traps of  j  unfold loops using gfp for termination  for constructing the gain function of  j record (when traversing  j ):  traps remaining on the path  j and  the lengths of inter-trap paths  construct the gain function for full path  j using trap-to-trap distances on that path and the vector of trap variables.  Global data constraint for the path is a conjunction of data constraints pairwise traps of  j 57J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012

Summary  RPT synthesis technique relies on offline static analysis of the SUT model and test goals.  Efficiency of planning: Number of rules that have to be evaluated at each step is relatively small (i.e., = the number of outgoing transitions of a current state) The execution of decision rules is significantly faster than looking through all potential alternatives at runtime. Scalability supported by RRT pruning technique Provides test sequences that are lengthwise close to optimal. J.Vain “...Reactive Planning Testing...”Abo, Feb 3,

DTRON: Distributed RPT execution ( 59 SPREAD J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012

|| LTC communicating timed automata (TA) 60 TA model of local SUT component (extended with online planning constraints) TA model of the local test goal (property) MsMs MgMg || TA model of local SUT component (extended with online planning constraints) TA model of the local test goal (property) MsMs MgMg “TCI update” signals “Test coverage item (TCI) reached” signal TCI synchro LTC J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012

61 Tester components communicate over channels J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012

DTRON: distibuted, heterogeneous components 62 SPREAD Selenium TestCast Z3 J.Vain “...Reactive Planning Testing...”Abo, Feb 3, 2012

DTRON: dynamic test reconfiguration 63 SPREAD Selenium TestCast Selenium Model (Tester k )Model (Tester 1 )Model (Test Plan Supervisor) Tester component updates

DTRON: Visualization of test runs 64

Questions? Thank You! J.Vain “...Reactive Planning Testing...”Abo, Feb 3,