Presentation is loading. Please wait.

Presentation is loading. Please wait.

Automaton-Based Approach for Defining Dynamic Semantics of DSLs

Similar presentations


Presentation on theme: "Automaton-Based Approach for Defining Dynamic Semantics of DSLs"— Presentation transcript:

1 Automaton-Based Approach for Defining Dynamic Semantics of DSLs
Ulyana Tikhonova St. Petersburg State Polytechnical University, Russia Eindhoven University of Technology, The Netherlands Не спешить!!! Открыть рядом visio с картинками метамоделей и автоматов! Supervised by: Suzana Andova Mark van den Brand Fedor A. Novikov 31/08/2011 SET

2  Motivation Domain-Specific Languages Model Driven Engineering
design, implementation, maintenance Model Driven Engineering DSL dynamic semantics DSL metamodel transformations A DSL captures the domain knowledge and therefore makes software development more efficient. However as any software product a DSL needs to be designed, implemented and afterwards maintained. In the context of MDE a DSL design usually consists in defining its metamodel. Then a DSL is implemented through m2m and m2t transformations which target different execution models. So in this case the dynamic semantics of a DSL is hidden in these transformations and in fact can be implemented differently: Different transformations => different implementations of the DSL dynamic semantics => Inconsistency and code duplication This is bad and can cause problems in maintenance. programming languages verification languages simulation models 31/08/2011 SET

3  Motivation Domain-Specific Languages Model Driven Engineering
design, implementation, maintenance Model Driven Engineering DSL metamodel DSL dynamic semantics Making dynamic semantics explicit Extend it and make explicite transformations programming languages verification languages simulation models 31/08/2011 SET

4 Automaton-based solution
Executable dynamic semantics specification Notation of UML state machine diagrams AutoLanD DSL: executable UML for automata What is executability? We want to achieve executable specification of a DSL dynamic semantics: so that this specification is enough and as soon as we have it we can execute it and run DSL programs. And we want to use UML notation for it – widely spread and considered to be the standard. So we implemented AutoLanD - … This language specifies the way we interpret sm diagrams. The feature of the proposed language is the way we treat standard automaton concepts: trigger, … We use them as interaction interfaces of an automaton. Via these interfaces automata can be bound with each other or with any other object. (provides flexibility) 31/08/2011 SET

5 AutoLanD DSL dynamic semantics DSL metamodel Interpretation
… about AutoLanD language: how it works (non-readable pictures of automata connected to some particular model) Animation like: metamodel+automata -> model+automata instances Interpretation Code generation Verification 31/08/2011 SET

6 The idea in detail Automata classes DSL metamodel
Semantics DSL metamodel «instanceOf» «instanceOf» Automata instances network This idea of the language was the only one that I had in the beginning (10 months ago). This what I was aiming at. Next slides: how I implemented this. DSL program ( A = {a, b, c}  {c, d, e} ) interprets execute 31/08/2011 SET

7 Solution Specified by a DSL designer AVM M1 M0
relationships between automata and metamodel AVM M1 input M0 Instantiated by AVM (automata virtual machine) This is solution. Then comes the implementation. And here the implementation of the executability-feature… execute 31/08/2011 Specified by a DSL user

8 Way 1 : generation of java-code
relationships between automata and metamodel DSL metamodel automata EMFText + Xpand EMF metamodel java-classes automata java-classes AVM java-class M1 Helicopter view on how we implement here the scheme from the previous slide! Demo! Обвести что описывает DSL designer!!! M0 running Java 31/08/2011 SET

9 Relationships between automata and metamodel
Way 2 : bootstrapping AutoLanD metamodel Relationships between automata and metamodel AutoLanD semantics Automaton structure Network model AVM M1 «instanceOf» «instanceOf» «instanceOf» M0 AutoLanD program input Still in work execute Automata network input-based generation AVM’ 31/08/2011 SET

10 Conclusions AutoLanD is implemented  yoo-hoo!
Code generation = programming: rapid implementation + testing SOS: understanding of the core semantics + reconsidering a DSL design AutoLanD Executability  Accurate defining of all details Design vs. programming Based on application of these three approaches we made following observations. Executability of the DSL definition implies (needs) accurate defining of all details (both in metamodel and semantics) What was done particularly in Eindhoven during 10 months. 31/08/2011 SET

11 Open problems Language for specifying mapping between metamodel-based input and automata network  the higher-leveled definition of an AVM Bootstrapping is not finished Applying AutoLanD to some DSL Посмотреть в тетрадочке!! 31/08/2011 SET

12 Thank you! vlaaai time? 31/08/2011 SET

13 AutoLanD metamodel 31/08/2011 SET

14 Network metamodel 31/08/2011 SET

15 AutoLanD semantics: AutoInstance SM
31/08/2011 SET

16 AutoLanD semantics: Scheduler SM
31/08/2011 SET

17 Scalability DSL dynamic semantics 31/08/2011 SET

18 Bootstrapping scheme metamodel Set DSL Set model (program)
«instanceOf» metamodel Set DSL Set model (program) semantics automata run compilation «instanceOf» Scheme about bootstrapping metamodel AutoLanD DSL semantics automata run interpretation 31/08/2011 SET


Download ppt "Automaton-Based Approach for Defining Dynamic Semantics of DSLs"

Similar presentations


Ads by Google