dsl composition for model- based test generation (or adding testability to a dsl by using dsl...
TRANSCRIPT
![Page 1: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/1.jpg)
DSL Composition for Model-Based Test Generation
(or Adding Testability to a DSL by using DSL Composition)
Bruno Barroca, Vasco Amaral and Luís Pedro
Levi Lúcio, Didier Buchs
![Page 2: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/2.jpg)
Merge of SATEL and HALL
2
![Page 3: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/3.jpg)
What is SATEL?
• Template language for test generation
• Depends on the– Syntax of the target DSL: input and output types
of the target DSL and data type signatures– Semantics of the target DSL: step and type
semantics of the target DSL
3
![Page 4: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/4.jpg)
Semantics of the Merged Language
HALL model Instantiated Test Intention ? ⊨
<tick> <mark with time(1)>, true<tick> <tick> <mark with time(2)>, true…
Valid tests for TestMark
<tick> <mark with time(2)>, false<tick> <tick> <mark with time(1)>, false…
Invalid tests for TestMark
4
![Page 5: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/5.jpg)
Starting point: merge of SATEL and HALL in Prolog
5
![Page 6: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/6.jpg)
Motivation
We merged, using Prolog, a test specification language and a DSL to add testability to that DSL.
Can we formalize that merge in terms of language composition?
Can we use the formalization to add testability to any DSL?
6
![Page 7: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/7.jpg)
Road Map
• Starting point: merge of SATEL and HALL in Prolog
• CoPsy: a DSL composition framework • SATEL + HALL composition formalization• Extrapolation of the approach• Conclusions and future work
7
![Page 8: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/8.jpg)
CoPsy: Syntactic Composition
parametricmetamodel
effective parametermetamodel
Φ={(Bfp,Cep)}
8
![Page 9: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/9.jpg)
CoPsy: Semantic Composition
SyntacticComposition
9
Ψ={(tr2fp,tr2ep)}
![Page 10: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/10.jpg)
Road Map
• Starting point: merge of SATEL and HALL in Prolog
• CoPsy: a DSL composition framework • SATEL + HALL composition formalization• Extrapolation of the approach• Conclusions and future work
10
![Page 11: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/11.jpg)
Composition Map
Syntactic Composition
11
![Page 12: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/12.jpg)
Syntactic Composition
• Input and Output signatures
• Abstract syntax of operational part of the target DSL
• Abstract syntax of the data types of the target DSL
Φ= {(a,j), (b,i), (c,k), (d,l), (e,m), (g,n), (f,g)}
12
![Page 13: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/13.jpg)
Composition Map
Inference RulesFor BuildingSemantics
13
![Page 14: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/14.jpg)
Inference Rules for Building Semantics
14
![Page 15: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/15.jpg)
Inference Rule Example
(acc < 6), t in TickIntention => t . <mark with time(acc)> in TestMark;
HALLStepSemantics
ValidTests Intentions
HALLTypes
HALLInit
15
![Page 16: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/16.jpg)
Composition Map
Transformation Composition16
![Page 17: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/17.jpg)
Transformation Composition (partial)
Ψ= {(tr4fp,tr4ep), (tr5fp,tr5ep), (tr6fp,tr6ep), (tr7fp,tr7ep)}
17
![Page 18: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/18.jpg)
Road Map
• Starting point: merge of SATEL and HALL in Prolog
• CoPsy: a DSL composition framework • SATEL + HALL composition formalization• Extrapolation of the approach• Conclusions and future work
18
![Page 19: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/19.jpg)
Extrapolation of the approach
• Using CoPsy, we need to identify, in the target DSL, the abstract syntax for:– Inputs/outputs– Operational behaviour specification– Data types specification
• And the transformation rules to generate the inference rules to compute for the target DSL:– The step semantics– The semantics of types
19
![Page 20: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/20.jpg)
Conclusions / Future Work
• Can we formalize a SATEL + HALL merge in terms of language composition? Yes!
20
![Page 21: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/21.jpg)
Conclusions / Future Work
• Can we use that formalization to add testability to any DSL?– We are now implementing the composition
approach;– In order to validate the extrapolation we will apply
it to another DSL (APN).
21
![Page 22: DSL Composition for Model- Based Test Generation (or Adding Testability to a DSL by using DSL Composition) Bruno Barroca, Vasco Amaral and Luís Pedro Levi](https://reader036.vdocuments.us/reader036/viewer/2022070412/5697bf7c1a28abf838c83fbd/html5/thumbnails/22.jpg)
Questions?
22