Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for...
-
Upload
kathlyn-fletcher -
Category
Documents
-
view
217 -
download
0
Transcript of Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for...
![Page 1: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/1.jpg)
Natallia Kokash(Accepted for PACO’2011)
ACG, 31/05/20111
Input-output conformance testing for channel-based connectors
1
![Page 2: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/2.jpg)
Agenda
ACG, 31/05/20112
IntroductionReoSemantics of Reo
Automata-basedProcess algebra-based
Input-output conformance (ioco) theoryUsing ioco to test ReoTool support
Related workConclusions and future work
![Page 3: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/3.jpg)
ACG, 31/05/20113
Introduction
Reo is a channel-based coordination language
Components or services are coordinated by Reo connectors
Primitive connectors with just two ends are called channels
Connectors can be composed to form more complex connectors
Channels are user-definedNodes implement a fixed routing policy
![Page 4: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/4.jpg)
ACG, 31/05/20114
Constraint automata
Constraint automaton A = (S, N , →, s0) consists of a set of states S, a set of port names N , a transition relation → ⊆ S × 2N × DC × S, where
DC is the set of data constraints over a finite data domain Data,
an initial state s0 ∈ S.
Two operators on CA are defined: product and port hiding
A CA for a Reo connector can be computed as product of CA for individual channels.
![Page 5: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/5.jpg)
ACG, 31/05/20115
Basic Reo channels and nodes
![Page 6: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/6.jpg)
ACG, 31/05/20116
Constraint automata for basic channels and nodes
![Page 7: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/7.jpg)
ACG, 31/05/20117
Process algebra mCRL2 Actions are atomic events Processes are the active entities defined as expressions over actions and other processes
Multiaction: a|b (synchronized actions) Alternative composition: a + b (nondeterministic choice) Sequential composition: a.b (b started after a) Conditional: exp → a ◊ b (if-then-else) At operator: act (action a happens at time t) Summation: ∑d∈D a(d) (a(d1) + a(d2) + a(d3)…)
Parallel composition: a||b (interleavings a.b + b.a + a|b) Renaming: ρR(a) where R is a set of renamings of the form b → c, meaning
that every occurrence of b in a is replaced by c Hiding: τH(a) renames all actions of H in a to τ
Restriction (allow): ∇R(a) where R specifies which actions are allowed to occur in a
Blocking: ∂B(a) where B is a set of actions that is not allowed to occur in a
Communication: ΓC(p), where C is a set of allowed communications of the form a0|...|an→ c, n ≥1 which means that every group of actions a0|...|an within a multiaction is replaced by an action c
![Page 8: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/8.jpg)
ACG, 31/05/20118
From CA to mCRL2Data flow observed at a channel end = mCRL2 action
![Page 9: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/9.jpg)
ACG, 31/05/20119
Correctness
![Page 10: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/10.jpg)
ACG, 31/05/201110
Correctness
![Page 11: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/11.jpg)
Why do we need testing for Reo?
ACG, 31/05/201111
Circuit design is error-proneIt is not a trivial task to design a Reo
connector with a certain behaviorModel-checking is not always feasible (e.g.,
data-aware models with infinite domains)When Reo is used for workflow and
dataflow design, how do we assure the quality of workflow/dataflow implementations?
![Page 12: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/12.jpg)
Specification: Reo
ACG, 31/05/201112
![Page 13: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/13.jpg)
Implementation: extension of BPEL
ACG, 31/05/201113
<bpws:process exitOnStandardFault="yes" name="separation_of_duty_V_001“ suppressJoinFailure="yes"
targetNamespace=http://www.iaas.uni-stuttgart.de/pf/separation_of_duty … <bpws:variables> <bpws:variable name=“Clerk1"/> <bpws:variable name=“Clerk2"/> <bpws:variable name=“ProcessRequest"/> <bpws:variable name=“Authorize"/> </bpws:variables> <bpws:sequence name="Process Fragement: Separation of duty"> <bpws:scope name="Scope"> <bpws:flow name="Flow"> <bpws:links> <bpws:link name="link1"/> <bpws:link name="link2"/> <bpws:link name="link3"/>
<bpws:link name="link4"/> </bpws:links> <bpws:sources> <bpws:source linkName="link1"/> </bpws:sources> <bpws:invoke name=“Task1"> <bpws:targets> <bpws:target linkName="link1"/> </bpws:targets> <bpws:sources> <bpws:source linkName="link2"/> </bpws:sources> </bpws:invoke> … <bpws:invoke name=“Task2“> <bpws:targets> <bpws:target linkName="link3"/> </bpws:targets> <bpws:sources> <bpws:source linkName="link4"/> </bpws:sources> </bpws:invoke> </bpws:flow> </bpws:scope> </bpws:sequence> </bpws:process>
![Page 14: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/14.jpg)
ACG, 31/05/201114
Examples of wrong connector implementations
![Page 15: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/15.jpg)
Input-output conformance theory
ACG, 31/05/201115
Model-based testing aims at automatically generating test suits from software models
J. Tretmans (2008): Model Based Testing with Labelled Transition Systems. In: Formal Methods and Testing, LNCS 4949, Springer, pp. 1–38.
Formal, specification-based active, black-box, functionality testing
![Page 16: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/16.jpg)
Labelled transition systems
ACG, 31/05/201116
![Page 17: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/17.jpg)
Language with LTS as operational semantics
ACG, 31/05/201117
![Page 18: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/18.jpg)
Sequences of observable actions
ACG, 31/05/201118
![Page 19: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/19.jpg)
Some definitions: tau-abstracted sequence of observable actions
ACG, 31/05/201119
![Page 20: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/20.jpg)
Some useful definitions
ACG, 31/05/201120
![Page 21: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/21.jpg)
LTL with Inputs/Outputs and Input-Output Transition Systems (IOTS)
ACG, 31/05/201121
![Page 22: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/22.jpg)
Input-output transition systems
ACG, 31/05/201122
Two ways to convert LTL with I/O to IOTS:1. Angelic completion: add self-loops to every
reachable state
2. Demonic completion: add a chaos state χ such that all non-specified inputs lead to χ, once in χ any behavior is possible.
![Page 23: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/23.jpg)
Quiescent and suspension traces
ACG, 31/05/201123
Extend traces with observations of quiescence:
Traces that can contain the quiescence action are called suspension traces:
![Page 24: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/24.jpg)
Quiescence
ACG, 31/05/201124
The occurrence of θ in a test indicates the detection of quiescence δ
![Page 25: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/25.jpg)
Test case
ACG, 31/05/201125
A tester should not offer more than one input at a time:
![Page 26: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/26.jpg)
Examples of test cases
ACG, 31/05/201126
![Page 27: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/27.jpg)
The ioco relation
ACG, 31/05/201127
![Page 28: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/28.jpg)
Example
ACG, 31/05/201128
![Page 29: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/29.jpg)
Compositional testing
ACG, 31/05/201129
![Page 30: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/30.jpg)
Example
ACG, 31/05/201130
![Page 31: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/31.jpg)
Test execution
ACG, 31/05/201131
![Page 32: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/32.jpg)
Test generation
ACG, 31/05/201132
![Page 33: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/33.jpg)
Application of ioco to testing ReoReo is a language with LTS semanticsWe can associate mCRL2 processes with
each state of a Reo circuit{A,B,C}→ A|B|C – a unique action (can be
renamed e.g., to ABC)
Extend CA/LTS with Input/Output actionsIs Reo implementation input enabled?
Specification: CA, implementation: ReoSpecification: Reo, implementation: ReoSpecification: Reo, implementation: BPEL,
Java, etc.ACG, 31/05/201133
![Page 34: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/34.jpg)
ACG, 31/05/201134
CA with Inputs and Outputs
Encoding for boundary nodes:
![Page 35: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/35.jpg)
Input/Output CA
ACG, 31/05/201135
We can apply angelic completion to a CA with I/O without changing the functional behavior of the circuit it specifies
Every boundary node A has associated Input and Output actions: A circuit cannot accept ?A through its input port A without observing !AAn environment cannot observe !B on the circuit output port B before ?B
What happens with pending requests if the circuit cannot process them?
![Page 36: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/36.jpg)
ACG, 31/05/201136
Compositional testing for Reo
![Page 37: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/37.jpg)
Tool support
ACG, 31/05/201137
specification (s)
Implementation (i)
![Page 38: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/38.jpg)
ACG, 31/05/201138
Test case simulation
![Page 39: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/39.jpg)
Related work
ACG, 31/05/201139
B. K. Aichernig, F. Arbab, L. Astefanoaei, F. S. de Boer, M. Sun & J. Rutten: Fault-Based Test Case Generation for Component Connectors. In: Third IEEE International Symposium on Theoretical Aspects of Software Engineering, (2009), pp. 147–154.
S. Meng, F. Arbab, B. K. Aichernig, L. Aştefănoaei, Frank S. de Boer, J. Rutten, “Connectors as designs: Modeling, refinement and test case generation,Science of Computer Programming, (2011).
Considers connectors as designsA prototype tool for test case generation developed in
Maude
“An approach based on I/O FSM is not appropriate for generating test cases for connectors, since it assumes that a pair of input and output constitutes an atomic action of a system, in other words, that the system cannot accept the next input before producing the output in reaction to the previous input. In Reo, such assumptions do not hold.”
![Page 40: Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/2011 1 Input-output conformance testing for channel-based connectors 1.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f135503460f94c27d94/html5/thumbnails/40.jpg)
Future work
ACG, 31/05/201140
Testing Java code generation for ReoTesting data-aware Reo:
J. Tretmans L. Frantzen & T. A.C. Willemse (2005): Test Generation Based on Symbolic Specifications. In J. Grabowski & B. Nielsen, editors: Proc. FATES 2004, LNCS 3395, Springer, pp. 1–15.
Testing timed Reo:Brinksma E. Brandan Briones, L. (2005): A Test
Generation Framework for quiescent Real-Time Systems. In J. Grabowski & B. Nielsen, editors: Proc. FATES 2004, LNCS 3395, Springer, pp. 64–78.