270 likes | 385 Vues
Automata Based Method for Domain Specific Languages Definition . Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised by Fedor Novikov Guest at TU/e, SET supervised by Mark van den Brand. Motivation. Domain Specific Languages
E N D
Automata Based Method for Domain Specific Languages Definition UlyanaTikhonova PhD student at St. Petersburg State Politechnical University, supervised by FedorNovikov Guest at TU/e, SET supervised by Mark van den Brand
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
The proposed solution • UML as description formalism • Executable UML to implement DSL Parsing algorithm Algorithm of interpretation UML class diagrams UML state machine diagrams are interpreted by Automata Virtual Machine
Outline • Automata model • DSL definition (example: mini language for manipulations with sets) • Metamodel • Operational semantics • Concrete syntax • Some conclusions on the method • Plan
Notation Name of state machine with declaration of local variables Controlled object: effects and guard conditions Source of events: triggers Composite state: substitution of state machine Exit point: output of submachine
Definition of DSL metamodel with UML class diagram Contextual constraints
Operational semantics of the mini language for manipulations with sets A = ? a, c
Semantics of the Programconcept Output Input Queries to model Invocation of components
Semantics of the Expression concept: Set Representation case Output: yield next element Queries to model
Concrete syntax = set of constructors of language concepts substitution
Concrete syntax of expression Setting and checking contextual constraints
Concrete syntax of Set Representation Usage of previously stored information
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
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 automata
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
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