1 Black-box conformance testing for real-time systems Stavros Tripakis VERIMAG Joint work with Moez Krichen.

Slides:



Advertisements
Similar presentations
A Survey of Runtime Verification Jonathan Amir 2004.
Advertisements

CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
1 Fault Diagnosis for Timed Automata Stavros Tripakis VERIMAG.
Knowledge Based Synthesis of Control for Distributed Systems Doron Peled.
1 University of Pennsylvania Grigoris Karvounarakis February 2004 Conversation Specification: A New Approach to Design and Analysis of E- Service Composition.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Testing and Quality Assurance
UPPAAL Introduction Chien-Liang Chen.
Timed Automata.
Testing Concurrent/Distributed Systems Review of Final CEN 5076 Class 14 – 12/05.
Robustness and Implementability of Timed Automata Martin De Wulf Laurent Doyen Nicolas Markey Jean-François Raskin Centre Fédéré en Vérification FORMATS-FTRTFT.
ECE 720T5 Fall 2012 Cyber-Physical Systems Rodolfo Pellizzoni.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
VerTeCS Verification models and techniques applied to the Testing and Control of reactive Systems Thierry Jéron IRISA/INRIA Rennes, France
Succinct Approximations of Distributed Hybrid Behaviors P.S. Thiagarajan School of Computing, National University of Singapore Joint Work with: Yang Shaofa.
An Automata-based Approach to Testing Properties in Event Traces H. Hallal, S. Boroday, A. Ulrich, A. Petrenko Sophia Antipolis, France, May 2003.
Automated Model-Based Testing of Hybrid Systems Michiel van Osch PROSE January 25,
© IT Innovation Centre University of Southampton and other members of the IRMOS consortium Provisioning and Orchestrating Stochastic Black Box Processes.
Convertibility Verification and Converter Synthesis: Two Faces of the Same Coin Jie-Hong Jiang EE249 Discussion 11/21/2002 Passerone et al., ICCAD ’ 02.
Model-based Testing of Hybrid Systems Michiel van Osch IPA Spring Days on Testing 19 April – 21 April 2006.
Ordering and Consistent Cuts Presented By Biswanath Panda.
Scheduling for Embedded Real-Time Systems Amit Mahajan and Haibo.
1 Jan Tretmans Embedded Systems Institute Eindhoven Radboud University Nijmegen Model-Based Testing.
Scheduling Using Timed Automata Borzoo Bonakdarpour Wednesday, April 13, 2005 Selected Topics in Algorithms and Complexity (CSE960)
Models of Computation for Embedded System Design Alvise Bonivento.
CS294, YelickConsensus, p1 CS Consensus
Department of CIS University of Pennsylvania 1/31/2001 Specification-based Protocol Testing Hyoung Seok Hong Oleg Sokolsky CSE 642.
25/06/2015Marius Mikucionis, AAU SSE1/22 Principles and Methods of Testing Finite State Machines – A Survey David Lee, Senior Member, IEEE and Mihalis.
Models of Computation as Program Transformations Chris Chang
Formal verification Marco A. Peña Universitat Politècnica de Catalunya.
Introduction to Software Testing
AUTOMATIC CONCOLIC TEST GENERATION WITH VIRTUAL PROTOTYPES FOR POST-SILICON VALIDATION Reviewer: Shin-Yann Ho Instructor: Jie-Hong Jiang.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
1 Jan Tretmans Embedded Systems Institute Eindhoven, NL Radboud University Nijmegen, NL Model-Based Testing with Labelled Transition.
Timed UML State Machines Ognyana Hristova Tutor: Priv.-Doz. Dr. Thomas Noll June, 2007.
AMOST Experimental Comparison of Code-Based and Model-Based Test Prioritization Bogdan Korel Computer Science Department Illinois Institute of Technology.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
CMSC 345 Fall 2000 Unit Testing. The testing process.
The State of Hybrid Model-Based Testing Michiel van Osch
Context Tailoring the DBMS –To support particular applications Beyond alphanumerical data Beyond retrieve + process –To support particular hardware New.
Verification and Validation Overview References: Shach, Object Oriented and Classical Software Engineering Pressman, Software Engineering: a Practitioner’s.
1 Software testing. 2 Testing Objectives Testing is a process of executing a program with the intent of finding an error. A good test case is in that.
Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek.
CIS 842: Specification and Verification of Reactive Systems Lecture Specifications: Sequencing Properties Copyright , Matt Dwyer, John Hatcliff,
Chapter 10 – Testing and Debugging. Chapter Goals ► Learn techniques to test your code ► Learn to carry out unit tests ► Understand principles of test.
What is software testing? 1 What are the problems of software testing? 2 Time is limited Applications are complex Requirements are fluid.
1 Hybrid-Formal Coverage Convergence Dan Benua Synopsys Verification Group January 18, 2010.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Conformance Test Suites, Extensionally Arend Rensink University of Twente Dutch Workshop on Formal Testing Techniques University of Twente 13 September.
Lyra – A service-oriented and component-based method for the development of communicating systems (by Sari Leppänen, Nokia/NRC) Traditionally, the design,
Timed I/O Automata: A Mathematical Framework for Modeling and Analyzing Real-Time Systems Frits Vaandrager, University of Nijmegen joint work with Dilsun.
1 Undecidable Problems of Decentralized Observation and Control Stavros Tripakis VERIMAG (based on [Puri,Tripakis,Varaiya-SCODES’01], [Tripakis-CDC’01],
Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/ Input-output conformance testing for channel-based connectors 1.
By, Venkateswara Reddy. Tallapu Reddy. 1.Introduction. 2.What is X-Machine Testing..?? 3.Methods of X-Machine Testing. 4.Variants of X- Machine. 5.Stream.
Conformance Test Experiments for Distributed Real-Time Systems Rachel Cardell-Oliver Complex Systems Group Department of Computer Science & Software Engineering.
Submodule construction for specifications with I/O, Nov Gregor v. Bochmann, University of Ottawa Submodule construction for specifications with.
Learning Symbolic Interfaces of Software Components Zvonimir Rakamarić.
Automatic Testing of Neighbor Discovery Protocol Based on FSM and TTCN Zhiliang Wang, Xia Yin, Haibin Wang, Jianping Wu Department of Computer Science.
CSCI1600: Embedded and Real Time Software Lecture 8: Modeling III: Hybrid Systems Steven Reiss, Fall 2015.
Towards Interoperability Test Generation of Time Dependent Protocols: a Case Study Zhiliang Wang, Jianping Wu, Xia Yin Department of Computer Science Tsinghua.
Shinya Umeno Nancy Lynch’s Group CSAIL, MIT TDS seminar September 18 th, 2009 Machine-Assisted Parameter Synthesis of the Biphase Mark Protocol Using Event.
1. Black Box Testing  Black box testing is also called functional testing  Black box testing ignores the internal mechanism of a system or component.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
SS 2017 Software Verification Timed Automata
CPE555A: Real-Time Embedded Systems
Synthesis from scenarios and requirements
CSCI1600: Embedded and Real Time Software
Software Testing COM /12/2019 Testing/Spring 98.
Presentation transcript:

1 Black-box conformance testing for real-time systems Stavros Tripakis VERIMAG Joint work with Moez Krichen

2 Black-box conformance testing Specification SUT (system under test) Tester outputs Verdicts (pass/fail/?) inputs Does the SUT conform to the Specification ? black box

3 Model-based testing The specification is given as a formal model. The SUT also behaves according to an unknown model (black-box). Conformance of SUT to the specification is formally defined w.r.t. these models.

4 Real-time Testing SUT Tester outputs Verdicts (pass/fail) inputs Tester observes events and time-stamps. Our models of preference Theory: timed automata Practice: the IF language (www-verimag.imag.fr/~async/IF/)

5 Plan of talk Specification model Conformance relation Analog & digital tests Test generation Tool and case studies

6 Plan of talk Specification model Conformance relation Analog & digital tests Test generation Tool and case studies

7 Specification model: general timed automata with input/output/unobservable actions Timed automata = finite-state machines + clocks. Input/output actions: interface with environment and tester. Unobservable actions: –Model partial observability of the tester. –Good for compositional specifications.

8 Simple example 1 a? x:=0 x  4 b! “Output b at most 4 time units after receiving input a. ”

9 Compositional specifications with internal (unobservable) actions. AB C

10 Compositional specifications internal (unobservable) actions.

11 Modeling assumptions on the environment system (spec) Compose the specification with a model of the environment. environment Export the interactions between them (make them observable).

12 Simple example 2 a? x  10x  4 b! “Output b at most 4 time units after receiving input a, provided a is received no later than 10 time units. ” Constraints on the inputs model assumptions. x:=0 Constraints on the outputs model requirements.

13 Simple example 2 a! y  10 “Output b at most 4 time units after receiving input a, provided a is received no later than 10 time units. ” A compositional modeling of the same example. y:=0 a? x:=0 x  4 b! a?b!

14 Plan of talk Specification model Conformance relation Analog & digital tests Test generation Tool and case studies

15 Conformance relation: tioco A timed extension of Tretman’s ioco (input- output conformance relation). Informally, A tioco B if –Every output of the implementation is allowed by the specification, including time delays. A: implementation/SUT (input-complete). B: specification (not always input-complete ( model environment assumptions).

16 Conformance relation Formally: A tioco B (A: implementation, B:specification) iff  Traces(B). out(A after  )  out(B after  )

17 Conformance relation where: A after  = {s |  Seq. s 0  s  proj( ,Obs)=  }  out(S) = delays(S)  outputs(S)

18 Conformance relation where: outputs(S) = {a  Outputs |  s  S. s  } a delays(S) = {t  R |  s  S.  UnobsSeq. time(  ) = t  s  } 

19 Examples “Output b at most 4 time units after receiving input a. ” a? x:=0 x  4 b! Spec:

20 Examples “Output b at most 4 time units after receiving input a. ” a? x:=0 x  4 b! Spec: a? x:=0x = 4 b! Impl 1:

21 Examples “Output b at most 4 time units after receiving input a. ” a? x:=0 x  4 b! Spec: a? x:=0x = 4 b! Impl 1: OK!

22 Examples “Output b at most 4 time units after receiving input a. ” a? x:=0 x  4 b! Spec: a? x:=0x = 4 b! Impl 1: a? x:=0 x  2 b! Impl 2: OK!

23 Examples “Output b at most 4 time units after receiving input a. ” a? x:=0 x  4 b! Spec: a? x:=0x = 4 b! Impl 1: a? x:=0 x  2 b! Impl 2: OK!

24 Examples “Output b at most 4 time units after receiving input a. ” a? x:=0 x  4 b! Spec: a? x:=0x = 5 b! Impl 3:

25 Examples “Output b at most 4 time units after receiving input a. ” a? x:=0 x  4 b! Spec: a? x:=0x = 5 b! Impl 3: NOT OK!

26 Examples “Output b at most 4 time units after receiving input a. ” a? x:=0 x  4 b! Spec: a? x:=0x = 5 b! Impl 3: a? Impl 4: NOT OK!

27 Examples “Output b at most 4 time units after receiving input a. ” a? x:=0 x  4 b! Spec: a? x:=0x = 5 b! Impl 3: a? Impl 4: NOT OK!

28 Plan of talk Specification model Conformance relation Analog & digital tests Test generation Tool and case studies

29 Timed tests Two types of tests: Analog-clock tests: –Can measure real-time precisely –Difficult to implement for real-time SUTs –Good (flexible) for discrete-time SUTs with unknown time step Digital-clock tests: –Can count “ticks” of a periodic clock/counter –Implementable for any SUT –Conservative (may say PASS when it’s FAIL)

30 Timed tests Analog-clock tests: –They can observe real-time precisely, e.g.: Digital-clock (or periodic-sampling) tests: –They only have access to a periodic clock, e.g.: ba c time bac 123

31 Timed tests Analog-clock tests: –They can observe real-time precisely, e.g.: Digital-clock (or periodic-sampling) tests: –They only have access to a periodic clock, e.g.: ba c time bac 123

32 Note Digital-clock tests does not mean we discretize time: –The specification is still dense-time –The capabilities of the observer are discrete-time ) –Many dense-time traces will look the same to the digital observer (verdict approximation)

33 Plan of talk Specification model Conformance relation Analog & digital tests Test generation Tool and case studies

34 Untimed tests Can be represented as finite trees (“strategies”): i o1 o2o3o4 fail i1i2i3 … … fail pass

35 Digital-clock tests Can be represented as finite trees: i o1 o2o3o4tick fail… i1i2i3 … … fail pass Models the tick of the tester’s clock

36 Analog-clock tests Cannot be represented as finite trees: i o1 o2o3o4 0.1 fail i1i2i3 … … fail pass … Infinite number of unknown delays Solution: on-the-fly testing

37 On-the-fly testing Generate the testing strategy during test execution. Symbolic generation. Can be applied to digital-clock testing as well.

38 Test generation principle current estimate = set of possible states of specification observation (event or delay) next estimate runs matching observation If empty, FAIL.

39 Test generation algorithmics Sets of states are represented symbolically (standard timed automata technology, DBMs, etc.) Updates amount to performing some type of symbolic reachability. Implemented in verification tools, e.g., Kronos. IF has more: dynamic clock creation/deletion, activity analysis, parametric DBMs, etc.

40 Digital-clock test generation Can be on-the-fly or static. Same algorithms. Trick: Generate “untimed” tester: tick is observable. Can also model skew, etc, using other “Tick” automata. “Tick” tick! z = 1 z:= 0 original specification automaton new specification automaton

41 Recent advances Representing analog-clock tests as timed automata. Coverage criteria.

42 Timed automata testers On-the-fly testing needs to be fast: –Tester reacts in real-time with the SUT. –BUT: reachability can be costly. –Can we generate a timed automaton tester ? Problem undecidable in general: –Non-determinizability of timed automata. Pragmatic approach: –Fix the number of clocks of the tester. –Fix their reset positions. –Synthesize the rest: locations, guards, etc.

43 Timed automata testers Example: a? x:=0 1  x  4 b! Spec: a! x=1 Tester: x > 4 b? x < 1 FAIL PASS 1  x  4 b?

44 Coverage A single test is not enough. Exhaustive test suite up to given depth: –Explosion: # of tests grows exponentially! Coverage: few tests, some guarantees. Various criteria: –Location: cover locations of specification. –Edge: cover edges of specification. –State: cover states (location,clocks) of spec. Algorithms: –Based on symbolic reachability graph. –Performance can be impressive: 8 instead of tests.

45 Plan of talk Specification model Conformance relation Analog & digital tests Test generation Tool and case studies

46 Implementation Implemented on top of IF environment. TTG: Timed Test Generation

47 Tool Input language: IF timed automata –Dynamic creation of processes/channels. –Synchronous/asynchronous communication. –Priorities, variables, buffers, external data structures, etc. Tool options: –Generate analog tester (or monitor). –Generate digital test/monitor suite: Interactively (user guided). Exhaustive up to given length. Coverage (current work).

48 Real-time Monitoring/Testing SUT Tester outputs Verdicts (pass/fail) inputs SUT Monitor outputs Verdicts (pass/fail)

49 A sample test generated by TTG

50 Case studies A bunch of simple examples tried out –A simple light controller.light controller –15000 digital tests up to depth 8. –8 tests suffice to cover specification. A larger example: NASA K9 Rover executive. –SUT: lines of C++ code. –TA specification generated automatically from mission plans. –Monitors generated automatically from TA specs. –Traces generated by NASA and tested by us.

51 Papers 1.Krichen, Tripakis, “Black-box conformance testing for real-time systems”, SPIN’04, LNCS Bensalem, Bozga, Krichen, Tripakis, “Testing conformance of real-time applications by automatic generation of observers”, Runtime Verification’04, ENTCS. 3.Krichen, Tripakis, “Real-time testing with timed automata testers and coverage criteria”, submitted.

52 merci ! des questions ?