Formal Testing with Input-Output Transition Systems Ed Brinksma Course 2004.

Slides:



Advertisements
Similar presentations
Model-Based Testing and Test-Based Modelling
Advertisements

1 Lars Frantzen, Pieter Koopman, René de Vries, Tim Willemse, Jan Tretmans Radboud University Nijmegen © Jan Tretmans Radboud University Nijmegen Testing.
Process Algebra (2IF45) Abstraction in Process Algebra Suzana Andova.
1.6 Behavioral Equivalence. 2 Two very important concepts in the study and analysis of programs –Equivalence between programs –Congruence between statements.
Game-theoretic approach to the simulation checking problem Peter Bulychev Vladimir Zakharov Lomonosov Moscow State University.
4/25/20151 Metodi formali nello sviluppo software a.a.2013/2014 Prof.Anna Labella.
Formal Conformance Testing of Systems with Refused Inputs and Forbidden Actions Igor Burdonov, Alexander Kossatchev, Victor Kuliamin ISP RAS, Moscow.
Unifying Theories of Concurrency: CCSandCSP He Jifeng and Tony Hoare BCTCSApril 6, 2006.
Behavioral Equivalence Hossein Hojjat Formal Lab University of Tehran.
Testing Transition Systems with Input and Output Testers Alexandre Petrenko Nina Yevtushenko Jia Le Huo TestCom’03, May 27 th, 2003.
Equivalences on Labelled Transition Systems Ed Brinksma Course 2004.
CPSC 668Set 14: Simulations1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
Automated Model-Based Testing of Hybrid Systems Michiel van Osch PROSE January 25,
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Model-based Testing of Hybrid Systems Michiel van Osch IPA Spring Days on Testing 19 April – 21 April 2006.
A testing scenario for probabilistic automata Marielle Stoelinga UC Santa Cruz Frits Vaandrager University of Nijmegen.
Conformance Simulation Relation ( ) Let and be two automata over the same alphabet simulates () if there exists a simulation relation such that Note that.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Model-Based Testing Ed Brinksma University of Twente Dept. of Computer Science Formal Methods & Tools group Enschede The Netherlands ARTIST2 Summer School.
1 Jan Tretmans Embedded Systems Institute Eindhoven Radboud University Nijmegen Model-Based Testing.
1 Finite Automata. 2 Finite Automaton Input “Accept” or “Reject” String Finite Automaton Output.
1 Jan Tretmans University of Nijmegen © Jan Tretmans University of Nijmegen Model Based Testing Property Checking for Real.
Software Testing Prof. Dr. Holger Schlingloff Humboldt-Universität zu Berlin and Fraunhofer Institute of Computer Architecture and Software Technology.
1 Jan Tretmans Radboud University Nijmegen (NL) © Jan Tretmans Radboud University Nijmegen together with: University of Twente Enschede.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
1 Non-Deterministic Automata Regular Expressions.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Costas Busch - LSU1 Non-Deterministic Finite Automata.
EECS 20 Lecture 12 (February 12, 2001) Tom Henzinger Equivalence.
Chapter 8 Asynchronous System Model by Mikhail Nesterenko “Distributed Algorithms” by Nancy A. Lynch.
1 Jan Tretmans Embedded Systems Institute Eindhoven, NL Radboud University Nijmegen, NL Model-Based Testing with Labelled Transition.
Rosen 5th ed., ch. 11 Ref: Wikipedia
1 740f02frankl25 Evaluating Testing Methods by Delivered Reliability Frankl, Hamlet, Littlewood, Strigini IEEE TOSE Aug98.
The State of Hybrid Model-Based Testing Michiel van Osch
Testing with Formal Methods Ed Brinksma course 2004 A Formal Framework.
Advanced Topics in SE Spring Process Algebra Hossein Hojjat Formal Methods Lab University of Tehran.
Model Based Testing Group 7  Nishanth Chandradas ( )  George Stavrinides ( )  Jeyhan Hizli ( )  Talvinder Judge ( )  Saajan.
Reactive systems – general
2G1516 Formal Methods2005 Mads Dam IMIT, KTH 1 CCS: Operational Semantics And Process Algebra Mads Dam Reading: Peled 8.3, 8.4, 8.6 – rest of ch. 8.
CIS 842: Specification and Verification of Reactive Systems Lecture Specifications: LTL Model Checking Copyright , Matt Dwyer, John Hatcliff,
Testing Techniques Testing with Finite State Machines Ed Brinksma course 2004.
Conformance Test Suites, Extensionally Arend Rensink University of Twente Dutch Workshop on Formal Testing Techniques University of Twente 13 September.
Copyright , Doron Peled and Cesare Tinelli. These notes are based on a set of lecture notes originally developed by Doron Peled at the University.
Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/ Input-output conformance testing for channel-based connectors 1.
Formal methods & Tools Ed Brinksma University of Twente, Netherlands ISSTA/Wosp Rome, July 24 th, 2002 Qualitative and Quantitative Analysis of Software.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
1 Black-box conformance testing for real-time systems Stavros Tripakis VERIMAG Joint work with Moez Krichen.
Ed Brinksma Course 2004 TorX : A Test Generation Tool.
Model-driven Test Generation Oleg Sokolsky September 22, 2004.
2G1516 Formal Methods2005 Mads Dam IMIT, KTH 1 CCS: Processes and Equivalences Mads Dam Reading: Peled 8.5.
2G1516/2G1521 Formal Methods2004 Mads Dam IMIT, KTH 1 CCS: Processes and Equivalences Mads Dam Reading: Peled 8.1, 8.2, 8.5.
Section 5-2.  The work done by a machine is work output. Work output = resistance force x resistance distance.  The work done on a machine is work input.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
Test Generation for Input/Output Transition Systems Ed Brinksma Course 2004.
Languages.
Non Deterministic Automata
Preorders on Labelled Transition Systems
فصل نهم از کتاب طراحی آموزشی تألیف :آر.ام گانیه
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Non-Deterministic Finite Automata
Internet of Things A Process Calculus Approach
Non-Deterministic Finite Automata
Formal Methods in software development
Non Deterministic Automata
Machine Learning Course.
Formal Methods in software development
Conformance Testing with State Mapping
A test generation framework for quiescent real-time systems
Presentation transcript:

Formal Testing with Input-Output Transition Systems Ed Brinksma Course 2004

© Ed Brinksma/Jan Tretmans Formal Testing exec : TESTS  IMPS   (OBS) der : SPECS   (TESTS) T s  TESTS s  SPECS IUT  IMPS imp i IUT  MODS obs : TESTS  MODS   (OBS) t :  (OBS)  {fail,pass} OBS pass fail Proof soundness and exhaustivess:  i  MODS. (  t  der(s). t (obs(t,i)) = pass )  i imp s Test hypothesis :  IUT  IMPS.  i IUT  MODS.  t  TESTS. exec(t, IUT ) = obs(t,i IUT )

© Ed Brinksma/Jan Tretmans Input-Output Transition Systems dub coffee kwart tea S1 S2 S3 S4 S0 L I = { ?dub, ?kwart } L U = { !coffee, !tea } dub, kwartcoffee, tea from user to machinefrom machine to user initiative with userinitiative with machine machine cannot refuseuser cannot refuse inputoutput L I L U L I  L U =  L I  L U = L ! ? ? !

© Ed Brinksma/Jan Tretmans Input-Output Transition Systems L I = { ?dub, ?kwart } L U = { !coffee, !tea } Input-Output Transition Systems IOTS (L I,,L U )  LTS (L I,  L U ) IOTS is LTS with Input-Output and always enabled inputs: for all states s, for all inputs ?a  L I : ?dub ?kwart ?dub ! coffee ?kwart !tea S ?a

© Ed Brinksma/Jan Tretmans ?kwart ?dub ?kwart ?kwart ?dub ?kwart ?kwart ?dub ?dub ?kwart ?kwart ?dub ?kwart ?kwart ?dub ?dub ?kwart Input-Output Transition Systems ! coffee ?dub !tea ! coffee ?dub ! coffee ?dub !tea

© Ed Brinksma/Jan Tretmans Labelled Transition System Testing lSPECS  LTS ( L I  L U )  LTS lMODS  IOTS (L I, L U )  LTS lTESTS  TTS ( L U, L I )  LTS lOBS  traces lobs  t || i lder  der : LTS   ( LTS ) lWhich imp ? n(strong, weak, branching,... ) bisimulation ntrace-, testing-, refusal - preorder / equivalence nconf, conf*, aconf, nioconf, ioco, mioco F ioco

© Ed Brinksma/Jan Tretmans Formal Correctness testing equivalences refusal testing canonical tester Input Output Automata quiescence ioco

© Ed Brinksma/Jan Tretmans Preorders on Transition Systems implementation i specification s environment e   ? ? ?  i  s   e  E. obs ( e, i )  obs (e, s ) i  LTS s  LTS

© Ed Brinksma/Jan Tretmans Preorders on Input-Output Transition Systems implementation i specification s environment e imp i  IOTS(L I,L U ) s  LTS(L I  L U ) imp  IOTS (L I,L U ) x LTS (L I  L U ) Observing IOTS where system inputs interact with environment outputs, and v.v.

© Ed Brinksma/Jan Tretmans Preorders on Input-Output Transition System implementation i specification s environment e  IOTS(L U,L I ) imp i imp s   e  E. obs ( e, i )  obs (e, s ) i  IOTS(L I,L U ) s  LTS(L I  L U )

© Ed Brinksma/Jan Tretmans Input-Output Testing Relation implementation i specification s environment e obs ( e, p ) = ( traces (e||i ), Ctraces (e||i ) )  iot i  iot s   e  IOTS(L U,L I ). obs ( e, i )  obs (e, s ) i  IOTS(L I,L U ) s  LTS(L I  L U )

© Ed Brinksma/Jan Tretmans Input-Output Refusal Relation implementation i specification s environment e obs ( e, p ) = ( traces (e||i ), Ctraces (e||p) )  ior i  ior s   e  IOTS(L U,L I  {  } ). obs ( e, i )  obs (e, s ) i  IOTS(L I,L U ) s  LTS(L I  L U )

© Ed Brinksma/Jan Tretmans Input-Output Testing Relation i,s  LTS : i  te s   e  LTS. obs ( e, i )  obs (e, s ) inputs can never be refused by i outputs can never be refused by e :  FP ( i )  FP ( s ) FP ( p ) = {  , A  | A  L,   traces(p), p afer  refuses A } i  IOTS(L I,L U ) : i  iot s   e  IOTS(L U,L I ). obs ( e, i )  obs (e, s ) i afer  refuses A  A =  or A = L U

© Ed Brinksma/Jan Tretmans Input-Output Testing Relation  FP ( i )  FP ( s ) i  IOTS(L I,L U ) : i  iot s   e  IOTS(L U,L I ). obs ( e, i )  obs (e, s )  {  |   traces(i), i afer  refuses  }  {  |   traces(s), s afer  refuses  } and{  |   traces(i), i afer  refuses L U }  {  |   traces(s), s afer  refuses L U }  traces(i)  traces(s) and Q traces(i)  Qtraces(s) Q traces : Quiescent traces = traces ending in quiescence  i i= i i =  !x  L U  {  } : i !x  LULU

© Ed Brinksma/Jan Tretmans Input-Output Refusal Relation  Ftraces( i )  Ftraces ( s ) i  IOTS(L I,L U ) : i  ior s   e  IOTS(L U,L I  {  } ). obs ( e, i )  obs (e, s )   ( L  ( L ) )* : i  Failure trace  : Failure traces of i : Ftraces ( i ) = {   ( L  ( L ) )* | i }  Failure A :     A  {  } : i A i  where: inputs can never be refused by i outputs can never be refused by e : i afer  refuses A  A =  or A = L U

© Ed Brinksma/Jan Tretmans Input-Output Refusal Relation  Ftraces( i )  Ftraces ( s ) i  IOTS(L I,L U ) : i  ior s   e  IOTS(L U,L I  {  } ). obs ( e, i )  obs (e, s ) Straces : Suspension traces = Failure traces restricted to refusals quiescence L U =   Straces( i )  Straces ( s ) Straces ( i )= Ftraces ( i )   ( L  { L U } )* = {   ( L  {  } )* | i } 

© Ed Brinksma/Jan Tretmans Input-Output Refusal Relation i  IOTS(L I,L U ) : i  ior s   e  IOTS(L U,L I  {  } ). obs ( e, i )  obs (e, s )  Straces( i )  Straces ( s )    ( L  {  } )*: out ( i after  )  out ( s after  ) where: out ( I ) = { !x  L U | i !x, i  I }  {  | i  i, i  S }  !x out ( i after  ) = { !x  L U  {  } | i }

© Ed Brinksma/Jan Tretmans Implementation Relation ioco i  IOTS(L I,L U ) : i  ior s    ( L  {  } )*: out ( i after  )  out ( s after  ) To allow under-specification : i ioco s    Straces( s ) : out ( i after  )  out ( s after  )

© Ed Brinksma/Jan Tretmans i ioco s = def   Straces (s) : out (i after  )  out (s after  ) Implementation Relation ioco Correctness expressed by implementation relation ioco: Intuition: i ioco-conforms to s, iff if i produces output x after trace , then s can produce x after  if i cannot produce any output after trace , then s cannot produce any output after  ( quiescence  )

© Ed Brinksma/Jan Tretmans i ioco s = def   Straces (s) : out (i after  )  out (s after  ) Implementation Relation ioco p p= p p =  !x  L U  {  } : p !x  LULU Straces (s)= Ftraces (s)   ( L  { L U } )* = {   ( L  {  } )* | s }  p after  = { p’ | p p’ }  out ( P )= { !x  L U | p, p  P }  {  | p p, p  P } !x 

© Ed Brinksma/Jan Tretmans   Implementation Relation ioco out ( i after  ) = out ( i after ?dub ) = out ( i after ?dub.?dub ) = out ( i after ?dub.!coffee) = out ( i after ?kwart ) = out ( i after !coffee ) = out ( i after ?dub.!tea ) = out ( i after  ) = ! coffee ?dub ?kwart ?dub ?kwart i { }{ } { !coffee } { }{ } {  }{  }   { }{ } i ioco s = def   Straces (s) : out (i after  )  out (s after  )

© Ed Brinksma/Jan Tretmans !coffee ?dub i !coffee ?dub s out (i after  )= {  } out (i after ?dub) = { !coffee } out (i after ?dub.!coffee)= {  } out (s after  ) = {   } out (s after ?dub) = { !coffee } out (s after ?dub.!coffee) = {   } ioco Implementation Relation ioco i ioco s = def   Straces (s) : out (i after  )  out (s after  )

© Ed Brinksma/Jan Tretmans !coffee ?dub i !coffee ?dub s !tea out (i after ?dub) = { !coffee }out (s after ?dub) = { !coffee, !tea } ioco Implementation Relation ioco i ioco s = def   Straces (s) : out (i after  )  out (s after  )

© Ed Brinksma/Jan Tretmans !coffee ?dub s !coffee ?dub i !tea ?dub out (i after ?dub) = { !coffee, !tea }out (s after ?dub) = { !coffee}  ioco Implementation Relation ioco i ioco s = def   Straces (s) : out (i after  )  out (s after  )

© Ed Brinksma/Jan Tretmans out (i after ?dub) = { !coffee, !tea }out (s after ?dub) = { !coffee, !tea} ioco ?dub !coffee ?dub i !tea ?dub Implementation Relation ioco i ioco s = def   Straces (s) : out (i after  )  out (s after  ) !coffee ?dub s !tea

© Ed Brinksma/Jan Tretmans ioco ?dub ?kwart !coffee ?kwart i !tea !coffee ?dub s out (i after ?dub) = { !coffee } out (i after ?kwart) = { !tea } out (s after ?dub) = { !coffee } out (s after ?kwart) =  But ?kwart  Straces ( s ) Implementation Relation ioco i ioco s = def   Straces (s) : out (i after  )  out (s after  )

© Ed Brinksma/Jan Tretmans Implementation Relation ioco i ioco s = def   Straces (s) : out (i after  )  out (s after  ) ?dub ?kwart !coffee ?kwart i !tea ioco s ?dub !coffee ?kwart !tea out (i after ?dub) = { !coffee } out (i after ?kwart) = { !tea } out (s after ?dub) = { !coffee } out (s after ?kwart) = { !tea }

© Ed Brinksma/Jan Tretmans !coffee ?dub i ?kwart ?dub ?kwart ?dub ?kwart out (s after ?kwart) = { !tea } out (i after ?kwart) = {  } ioco Implementation Relation ioco i ioco s = def   Straces (s) : out (i after  )  out (s after  ) s ?dub !coffee ?kwart !tea

© Ed Brinksma/Jan Tretmans out (s after ?dub) = { !coffee } out (i after ?dub) = { , !coffee } ioco ?dub !coffee ?dub i !coffee ?dub s Implementation Relation ioco i ioco s = def   Straces (s) : out (i after  )  out (s after  )

© Ed Brinksma/Jan Tretmans out (s after ?dub) = { , !coffee } out (i after ?dub) = { , !coffee } ioco !coffee ?dub  s Implementation Relation ioco i ioco s = def   Straces (s) : out (i after  )  out (s after  ) ?dub !coffee ?dub i

© Ed Brinksma/Jan Tretmans out (i after ?dub.?dub) = out (s after ?dub.?dub) = { !tea, !coffee } i ioco s Implementation Relation ioco i ioco s = def   Straces (s) : out (i after  )  out (s after  ) i ?dub !tea ?dub !coffee ?dub s !coffee ?dub !tea ?dub !tea s ioco i out (i after ?dub.   ?dub) = { !coffee }  out (s after ?dub. .?dub) = { !tea, !coffee }

© Ed Brinksma/Jan Tretmans ?kwart ! coffee ?dub !tea ! coffee ?dub ?kwart ?dub ?kwart ! coffee ?dub !tea ioco Implementation Relation ioco ioco

© Ed Brinksma/Jan Tretmans i ioco s = def   Straces (s) : out (i after  )  out (s after  ) ? x (x >= 0) !  x ? x (x < 0) ? y implementation i ! -  x ? x (x >= 0) !  x ? x (x < 0) ? y specification s i ioco s s ioco i Implementation Relation ioco equation solver for y 2 =x :

© Ed Brinksma/Jan Tretmans Genealogy of ioco Labelled Transition Systems IOTS (IOA, IOSM, IOLTS) Testing Equivalences (Preorders) Refusal Equivalence (Preorder) Canonical Tester conf Quiescent Trace Preorder Repetitive Quiescent Trace Preorder (Suspension Preorder) ioco ioconf

© Ed Brinksma/Jan Tretmans Formal Testing with Transition Systems t :  (traces)  {fail,pass} exec : TESTS  IMPS   (OBS) traces der : LTS   (TTS) T s  TTS s  LTS IUT  IMPS ioco i IUT  IOTS pass fail obs : TTS  IOTS   (traces) Soundness and exhaustivess proved:  i  IOTS. (  t  der(s). t (obs(t,i)) = pass )  i ioco s Test hypothesis :  IUT  IMPS.  i IUT  IOTS.  t  TTS. exec(t, IUT ) = obs(t,i IUT )