Formal Conformance Testing of Systems with Refused Inputs and Forbidden Actions Igor Burdonov, Alexander Kossatchev, Victor Kuliamin ISP RAS, Moscow.

Slides:



Advertisements
Similar presentations
1 Turing Machines and Equivalent Models Section 13.2 The Church-Turing Thesis.
Advertisements

A university for the world real R © 2009, Chapter 3 Advanced Synchronization Moe Wynn Wil van der Aalst Arthur ter Hofstede.
Verification of Graph Transformation Systems Arman Sheikholeslami
Game-theoretic simulation checking tool Peter Bulychev, Vladimir Zakharov, Igor Konnov Moscow State University.
Game-theoretic approach to the simulation checking problem Peter Bulychev Vladimir Zakharov Lomonosov Moscow State University.
Multi-Paradigm Models as Source for Automatic Test Construction Victor Kuliamin ISP RAS, Moscow.
Requirements on the Execution of Kahn Process Networks Marc Geilen and Twan Basten 11 April 2003 /e.
Presented by: Thabet Kacem Spring Outline Contributions Introduction Proposed Approach Related Work Reconception of ADLs XTEAM Tool Chain Discussion.
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.
I MPLEMENTING S YNCHRONOUS M ODELS ON L OOSELY T IME T RIGGERED A RCHITECTURES Discussed by Alberto Puggelli.
Formal Languages and Automata Theory Applied to Transportation Engineering Problem of Incident Management Neveen Shlayan Ph.D. Candidate.
10. Petri Nets Prof. O. Nierstrasz. Roadmap  Definition: —places, transitions, inputs, outputs —firing enabled transitions  Modelling: —concurrency.
Conformance Simulation Relation ( ) Let and be two automata over the same alphabet simulates () if there exists a simulation relation such that Note that.
Katz Formal Specifications Larch 1 Algebraic Specification and Larch Formal Specifications of Complex Systems Shmuel Katz The Technion.
1 Ivan Lanese Computer Science Department University of Bologna Roberto Bruni Computer Science Department University of Pisa A mobile calculus with parametric.
Asynchronous Sequential Logic
1 Jan Tretmans Embedded Systems Institute Eindhoven Radboud University Nijmegen Model-Based Testing.
CP — Concurrent Programming 12. Petri Nets Prof. O. Nierstrasz Wintersemester 2005 / 2006.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
Petri Net Modeling for dynamic MM composite Object.
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
F. Khendek, G. Robert, G. Butler and P.Grogono Concordia University Montreal, Canada Implementability of Message Sequence Charts.
Finite State Machines Data Structures and Algorithms for Information Processing 1.
Protocol Analysis/Testing Based on Sidhu et al in IEEE TSE 89 and TN 93 Figures from the papers.
1 Jan Tretmans Embedded Systems Institute Eindhoven, NL Radboud University Nijmegen, NL Model-Based Testing with Labelled Transition.
Comparison of methods for supervisory control and submodule construction 1 Gregor v. Bochmann, University of Ottawa Comparison of methods for supervisory.
A Usable Reachability Analyser Victor Khomenko Newcastle University.
Testing with Formal Methods Ed Brinksma course 2004 A Formal Framework.
SDS Foil no 1 Process Algebra Process Algebra – calculating with behaviours.
Model Based Testing Group 7  Nishanth Chandradas ( )  George Stavrinides ( )  Jeyhan Hizli ( )  Talvinder Judge ( )  Saajan.
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.
Conformance Test Suites, Extensionally Arend Rensink University of Twente Dutch Workshop on Formal Testing Techniques University of Twente 13 September.
1 Context-dependent Product Line Practice for Constructing Reliable Embedded Systems Naoyasu UbayashiKyushu University, Japan Shin NakajimaNational Institute.
Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/ Input-output conformance testing for channel-based connectors 1.
Applying Model Based Testing in Different Contexts Alexander Petrenko Victor Kuliamin ISP RAS, Moscow.
Correct-by-construction asynchronous implementation of modular synchronous specifications Jacky Potop Benoît Caillaud Albert Benveniste IRISA, France.
Submodule construction in logics 1 Gregor v. Bochmann, University of Ottawa Using First-Order Logic to Reason about Submodule Construction Gregor v. Bochmann.
Regular Grammars Chapter 7. Regular Grammars A regular grammar G is a quadruple (V, , R, S), where: ● V is the rule alphabet, which contains nonterminals.
Formal Semantics of Programming Languages 虞慧群 Topic 1: Introduction.
Submodule construction for specifications with I/O, Nov Gregor v. Bochmann, University of Ottawa Submodule construction for specifications with.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
Algebra Problems… Solutions Algebra Problems… Solutions © 2007 Herbert I. Gross Set 17 part 2 By Herbert I. Gross and Richard A. Medeiros next.
ISP RAS Java Specification Extension for Automated Test Development Igor B. Bourdonov, Alexei V. Demakov, Andrei A. Jarov, Alexander S. Kossatchev, Victor.
UniTesK Test Suite Architecture Igor Bourdonov Alexander Kossatchev Victor Kuliamin Alexander Petrenko.
Properties as Processes : FORTE slide Properties as Processes: their Specification and Verification Joel Kelso and George Milne School of Computer.
UniTesK Test Suite Architecture Igor Bourdonov Alexander Kossatchev Victor Kuliamin Alexander Petrenko.
Formal Testing with Input-Output Transition Systems Ed Brinksma Course 2004.
Operational Semantics Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
1 You Never Escape Your… Relations EQUIVALENCE RELATION Presented by K.Senguttuvan, PGT Kendriya Vidyalaya, Gachibowli, Hyderabad. 2.
Compiler Construction Lecture Five: Parsing - Part Two CSC 2103: Compiler Construction Lecture Five: Parsing - Part Two Joyce Nakatumba-Nabende 1.
1 Igor Burdonov Alexander Kossatchev Building direct and back spanning trees by automata on a graph The Institute for System Programming (ISP) of the Russian.
Counterexample-Guided Abstraction Refinement By Edmund Clarke, Orna Grumberg, Somesh Jha, Yuan Lu, and Helmut Veith Presented by Yunho Kim Provable Software.
Victor Khomenko Newcastle University
BCT 2083 DISCRETE STRUCTURE AND APPLICATIONS
CPE555A: Real-Time Embedded Systems
Component Based Software Engineering
CS 352 Introduction to Logic Design
Chapter 9 TURING MACHINES.
Principles of Computing – UFCFA3-30-1
Intro to Data Structures
Language-based Security
Conformance Testing with State Mapping
V. Kuliamin, A. Petrenko, N.!Pakoulin, I.!Bourdonov, A.!Kossatchev
Presentation transcript:

Formal Conformance Testing of Systems with Refused Inputs and Forbidden Actions Igor Burdonov, Alexander Kossatchev, Victor Kuliamin ISP RAS, Moscow

Outline Introduction Formal Testing with LTSes and ioco Proposed conformance relation LTS Completion Conclusion

Formal Conformance Testing Requirements System under Test Specification Test Suite Implementation Model Test Suite Real WorldModel World conforms???conforms formally passes formallypasses derivation modeling translation  !!!

Labeled Transition Systems Model world – LTSes States Transitions Labels  Inputs ?a, ?b  Outputs !x, !y  Internal transitions τ Initial state ?a?a !x ?b?b !y τ

ioco Conformance Relation Testing abilities  Ability to provide inputs  Ability to observe outputs  Ability to observe quiescence I ioco S  for each δ -trace (trace with quiescence) σ of S  an output is possible in I after σ only if its is possible in S  quiescence is possible in I after σ only if it is possible in S ?a?a !x ?b?b δ

Examples ?a?a !x ?b?b δ !y τ S δ δ ?a?a !x ?b?b δ ?b ?a I1I1 δ !y ?a δ ?a?a !x ?b?b δ ?b ?a I2I2 δ !y ?a ?a?a ?b ?b?b δ ?a I3I3 !y ?a δ I 1 ioco SI 2 ioco SI 3 ioco S τ

? More Subtle Abilities Testing abilities  Ability to provide inputs  Ability to observe outputs  Ability to observe quiescence Constraints  Implementation should be input-enabled  Tester has full control over action firing of implementation - synchronous testing ( parallel composition semantics ) ?a?a !x ?b?b ?b ?a !y I ?b ?a?a τ !b T

Practical Considerations Some implementations are not input-enabled  Launch button  Memory allocation Testing in almost cases is asynchronous  Especially for distributed systems free(void *ptr) “ptr should be earlier returned by malloc(), calloc(), realloc()” (POSIX)

Environment Asynchronous Testing System under Test Tester Real WorldModel World Model Tester Implementation Context T I C I || C

Compositional Conformance We may try to check that ( I || C ) ioco ( S || C ) But ioco interacts with || in a bad way!  Unexpected conformance ( I || C ) ioco ( S || C ) while I ioco S  Unexpected non-conformance ( I || C ) ioco ( S || C ) while I ioco S

Bad Examples ?a?a !y ?b?b S !x?a?a I1I1 C – input and output queues I 1 ioco S ( I 1 || C ) ioco ( S || C ) ?a?a !y I2I2 !x ?b?b ?b?b!z I 2 ioco S ( I 2 || C ) ioco ( S || C )

Possible Ways out  ioco is asymmetric – I should be input-enabled, while S should not  ioco is preserved when S is input-enabled Consider input-enabled specs only Too narrow Replace S with S ’ such that  I I ioco S  I ioco S ’ ( S ~ ioco S ’) and S ’ is input-enabled Consider not input-enabled implementations and ioco analogue for them Consider context-specific conformance relations Queues already considered, but others are also needed

Outline Introduction Proposed conformance relation Extension of ioco for non-input-enabled implementations LTS Completion Conclusion

Meaning of Undefined Inputs Forbidden Should not be provided Refused Can be provided and its refusal can be observed Ignored Can be provided, does nothing  should be specified

Proposed Model LTS with forbidden actions and refused inputs Additional elements  Forbidden action γ  Refused inputs {?a}, {?b} βγδ -traces Contain inputs, outputs, δ, input refusals, γ γ can only be the last symbol ?a?a !y ?b?b !x τ {?a,?b}, δ {?a} {?b} δ ?b?b ?a?a ?a,?b ?b?b γ ?a?a

Safe Traces βγδ -traces that cannot cause forbidden action to occur ?b?b ?b ?a?a !x τ ?a?a γ ?a?a τ !y τ γ ?b?b Safe βγδ -traces: ?b !x ?a δ ?b{?b}?a !x?a δ {?a} δ {?b} δ, {?a} !x

Safety of Testing Test should not destroy implementation Safety hypothesis (weakening of input-enabledness hypothesis) Each safe βγδ -trace of S, which is also βγδ -trace of I, can be safely extended in I by each symbol safe after this trace in S Such I is called safe for S

ioco βγδ Conformance Relation Testing abilities  Ability to provide inputs  Ability to observe outputs  Ability to observe quiescence  Ability to observe input refusal Constraints  Implementation is safe for specification  Tester has full control over action firing of implementation (synchronous testing)

ioco βγδ Conformance Relation I ioco βγδ S  I is safe for S and for each safe βγδ -trace σ of S  an output safe in S after σ is possible in I after σ only if its is possible in S  quiescence safe in S after σ is possible in I after σ only if it is possible in S  an input safe in S after σ is possible in Ι after σ only if it is possible in S  an input refusal safe in S after σ is possible in I after σ only if it is possible in S

Examples ?a?a,?b γ SI2I2 I1I1 I 1 ioco βγδ SI 3 ioco βγδ S I 2 is not safe for S !y !x ?a?a !y ?b?b !x τ {?a,?b}, δ {?a} {?b} δ ?b?b γ ?a?a ?b?b ?a?a ?b?b γ !y !x ?b?b ?b {?b} {?a} !y δ {?b} {?a,?b}, δ δ ?a?a γ I3I3 ?a?a ?b?b!y ?b?b ?b {?b} {?a} !y δ I 4 ioco βγδ S I4I4 δ I5I5 I 5 ioco βγδ S !x?b I6I6 I 6 ioco βγδ S {?b} {?a}

Test Case Derivation Very similar to ioco Differences  We should escape forbidden action – Use safe traces only  We should test input refusals – Try to provide an input and observe refusal as a deadlock

Examples S ?a?a !y ?b?b !x τ {?a} {?b} δ ?b?b γ ?a?a {?a,?b}, δ T1T1 θ !a ?y?y ?x, θ !b!b ?x,?y !b θ !a θ θ θ θ ?x,?y θ θ !a !b!b T2T2 !x ?y, θ ?x,?y !b θ θ θ ?x,?y θ θ !a !b!b

Outline Introduction Proposed conformance relation LTS Completion  Trying to force composition to preserve conformance Conclusion

Completion Operations ioco is preserved when S is input-enabled Replace S with S ’ such that  I I ioco S  I ioco S ’ ( S ~ ioco S ’) and S ’ is input-enabled Then, I ioco S  I ioco S ’   C ( I || C ) ioco ( S ’ || C ) S ’ is more correct form of S – it can be used in any context

Demonic completion Ξ Tretmans et al. LTS May add more conforming implementations Undefined inputs τ All inputs All outputs?a?a !x !y τ SI I ioco S ?a?a ?a !y ?a Ξ(S) ?a?a?a?a τ !x ?a?a !y I ioco Ξ(S)

Basic Completion States Bc( S ) = δ -traces of S For each δ -trace σ of S add the following transitions R( σ ) means all δ -traces obtained from σ by deleting some δ -s  Add σ  σ marked with ?a if  μ  R( σ ) μ – δ -trace of S  Add σ  σ marked with !x if  μ  R( σ ) μ – δ -trace of S  Add internal σ  σ if  μ  R( σ ) μ – δ -trace of S and σ does not end with δ  Add σ  σ marked with !error if  μ  R( σ ) μ cannot be extended with any output, nor with δ ?a?a !x !y τ ?a?a

Proposed Completions Bc(LTS) Undefined inputs τ All inputs All outputs Bc(LTS) Undefined inputs γ ?a?a !x !y τ SΔ(S) ?a?a?a?a τ !x ?a?a !y ?a?a γ Γ(S) Δ Γ For each I and S in ioco domain I ioco S  I ioco βγδ Δ(S)  I ioco βγδ Γ(S)

Outline Introduction Proposed conformance relation LTS Completion Conclusion

Summary ioco ioco βγδ Extension for non-input-enabled implementations Completion – construction of equivalent input-enabled spec Δ, Γ ?

Announcement Notation  U – non-empty subsets of reachable states of S  A  U and z is safe in A  A z – states reachable from A by z and τ  A  U and z is unsafe in A  A z = γ  A  U and z is refusal set  A z – maximal stable subset of A that for each refusal in z it exists in each element of the subset States of F( S ) – U, U ×{outputs, δ }, γ Transitions  γ  γ marked with γ  If for symbol z A z is nonempty  A  A z and ( A, δ)  A z marked with z  If !y is safe and exists in A z where z is refusal set  internal A  (A z,!y) and (A z,!y)  (A z ) !y marked with !y  If each !y is unsafe or not exists in nonempty A z where z is refusal set  internal A  (A z, δ )  If for ?a A ?a is nonempty  ( A, !y )  A ?a marked with ?a

Practical Implications Not any specs are written correctly for use in component-based systems The transformation rules can serve for specification adjustment The rules can be rephrased into characteristics of correctly written specs

Contacts Igor Burdonov Alexander Kossatchev Victor Kuliamin

Thank you!