automata based method for domain specific languages definition ulyana tikhonova phd student at st....
TRANSCRIPT
![Page 1: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/1.jpg)
Automata Based Method for Domain Specific Languages Definition
Ulyana TikhonovaPhD student at St. Petersburg State Politechnical University,
supervised by Fedor NovikovGuest at TU/e, SET supervised by Mark van den Brand
![Page 2: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/2.jpg)
2
Motivation
• Domain Specific Languages– Both graphical and textual notations– Dynamic semantics of the language
• In the context of MDE– Models drive execution
• Using UML as description formalism– UML is considered to be more intelligible to
ordinary programmers
01.12.2010
![Page 3: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/3.jpg)
3
The proposed solution
01.12.2010
UML class diagrams
UML state machine diagrams
• UML as description formalism• Executable UML to implement DSL
are interpreted by Automata Virtual Machine
Algorithm of interpretation
Parsing algorithm
![Page 4: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/4.jpg)
4
Use case model
01.12.2010
![Page 5: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/5.jpg)
5
Outline
• Automata model• DSL definition (example: mini language for
manipulations with sets)– Metamodel– Operational semantics– Concrete syntax
• Some conclusions on the method• Plan
01.12.2010
![Page 6: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/6.jpg)
6
Automata model
01.12.2010
![Page 7: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/7.jpg)
7
Notation
01.12.2010
Name of state machine with declaration of local variables
Source of events: triggers
Controlled object: effects and guard conditions
Composite state: substitution of state machine
Exit point: output of submachine
![Page 8: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/8.jpg)
Weaving DSL
![Page 9: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/9.jpg)
9
Definition of DSL metamodel with UML class diagram
01.12.2010
Contextual constraints
![Page 10: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/10.jpg)
10
Operational semantics of the mini language for manipulations with sets
01.12.2010
a, cA = ?
![Page 11: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/11.jpg)
11
Semantics of the Program concept
01.12.2010
Input Output
Queries to model
Invocation ofcomponents
![Page 12: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/12.jpg)
12
Semantics of the Expression concept: Set Representation case
01.12.2010
Queries to model
Output: yield next element
![Page 13: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/13.jpg)
13
Semantics of the Expression concept: Set Id case
01.12.2010
![Page 14: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/14.jpg)
14
Semantics of the Expression concept: Operation() case
01.12.2010
![Page 15: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/15.jpg)
15
Semantics of the Expression concept: Operation() case
01.12.2010
![Page 16: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/16.jpg)
16
How should it work?
01.12.2010
![Page 17: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/17.jpg)
17
Applying interaction model: instance of the interaction
01.12.2010
![Page 18: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/18.jpg)
18
Interfaces specification
01.12.2010
![Page 19: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/19.jpg)
1901.12.2010
Second type of automata composition
![Page 20: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/20.jpg)
20
Concrete syntax = set of constructors of language concepts
01.12.2010
substitution
![Page 21: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/21.jpg)
Concrete syntax of expression
01.12.2010 21
Setting and checkingcontextual constraints
![Page 22: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/22.jpg)
22
Concrete syntax of Set Representation
01.12.2010
Usage of previously stored information
![Page 23: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/23.jpg)
23
Conclusion: advantages of the proposed method
• The same description formalism for definition of different notations (graphical, textual, etc.)– Events based generalization
• The same description formalism for concrete syntax definition and for semantics definition might simplify the process of new DSL creation– UML state machines diagrams
• Specification of new DSL should be sufficient for receiving its implementation automatically– Automata programming virtual machine
01.12.2010
![Page 24: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/24.jpg)
24
Plan• Implementation of the method = implementation
of the automata programming virtual machine– Specification of the method using M-SOS formalism– Programming
• Assessment of the proposed method– Specification of some DSL using this method
• Definition of the scope of the proposed method– Analysis of the kind of languages that could be defined
as instances of the proposed DSL meta-metamodel– Analysis of the kind of languages notations that are
convenient to be defined through automata01.12.2010
![Page 25: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/25.jpg)
25
Overview of the related work
• Theoretical approach– denotational semantics, action semantics, SOS
• Model transformation ± code generation– MPS, MetaEdit+, AMMA, …
• Source code of a translator/compiler – The most popular one
01.12.2010
![Page 26: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/26.jpg)
26
Why automata?
• DSL = metamodel + behavior + notation• Modeling behavior in UML– State machine diagrams– Activity diagrams
• Events based specification of the concrete syntax: events are considered to be captured by automata
01.12.2010
![Page 27: Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised](https://reader035.vdocument.in/reader035/viewer/2022070403/56649f295503460f94c434b6/html5/thumbnails/27.jpg)
27
DSL meta-metamodel
01.12.2010