domain level observation and control for compiled
play

Domain-Level Observation and Control for Compiled Executable DSLs - PowerPoint PPT Presentation

Domain-Level Observation and Control for Compiled Executable DSLs MODELS 2019 Foundations Track Mnich, Germany Erwan Bousse Manuel Wimmer University of Nantes LS2N, France CDL-MINT, Johannes Kepler University Linz, Austria 1/67


  1. Domain-Level Observation and Control for Compiled Executable DSLs MODELS 2019 Foundations Track − Münich, Germany Erwan Bousse Manuel Wimmer University of Nantes – LS2N, France CDL-MINT, Johannes Kepler University Linz, Austria 1/67

  2. Dynamic Analysis of Behavioral Models Behavioral models (eg. state machines) can conveniently describe the behaviors of systems under design. Domain-speci�c languages (DSLs) can be Behavioral engineered and used to build such models. model Dynamic analyses of behavioral models are crucial in early design phases to see how a described behavior unfolds over time . Require the possibility to execute models ⚙ ! 2/67

  3. Dynamic Analysis of Behavioral Models Behavioral models (eg. state machines) can conveniently describe the behaviors of DSL systems under design. conforms to Domain-speci�c languages (DSLs) can be Behavioral engineered and used to build such models. model Dynamic analyses of behavioral models are crucial in early design phases to see how a described behavior unfolds over time . Require the possibility to execute models ⚙ ! 3/67

  4. Dynamic Analysis of Behavioral Models Behavioral models (eg. state machines) can conveniently describe the behaviors of DSL systems under design. conforms to Domain-speci�c languages (DSLs) can be Behavioral engineered and used to build such models. model Dynamic analyses of behavioral models are crucial in early design phases to see how a described behavior unfolds over time . Require the possibility to execute models ⚙ ! Dynamic Analysis 4/67

  5. Dynamic Analysis of Behavioral Models Behavioral models (eg. state machines) can conveniently describe the behaviors of DSL systems under design. conforms to Domain-speci�c languages (DSLs) can be Behavioral engineered and used to build such models. model Dynamic analyses of behavioral models are crucial in early design phases to see how a Model Execution described behavior unfolds over time . Require the possibility to execute models ⚙ ! Dynamic Analysis 5/67

  6. Model execution with an interpreted DSL dependency Model conforms to Procedure input/output 6/67

  7. Model execution with an interpreted DSL Interpreted DSL dependency Model conforms to Procedure input/output 7/67

  8. Model execution with an interpreted DSL Interpreted DSL Abstract Syntax (metamodel) dependency Model conforms to Procedure input/output 8/67

  9. Model execution with an interpreted DSL Interpreted DSL Abstract Syntax (metamodel) Model State Definition dependency Model conforms to Procedure input/output 9/67

  10. Model execution with an interpreted DSL Interpreted DSL Abstract Syntax (metamodel) Model State Definition Execution Steps Definition Interpretation Rules dependency Model conforms to Procedure input/output 10/67

  11. Model execution with an interpreted DSL Interpreted DSL Abstract Syntax (metamodel) Model State Definition Target interpreter Execution Steps Definition Interpretation Rules dependency Model conforms to Engine Procedure input/output 11/67

  12. Model execution with an interpreted DSL Interpreted DSL Abstract Executed Syntax Model (metamodel) Model State Definition Target interpreter Execution Steps Definition Interpretation Rules dependency Model conforms to Engine Procedure input/output 12/67

  13. Model execution with an interpreted DSL Interpreted DSL Abstract Executed Syntax Model (metamodel) Model State State Definition Target interpreter Execution Steps Steps Definition runtime data Interpretation Rules dependency Model conforms to Engine Procedure input/output 13/67

  14. Model execution with an interpreted DSL Interpreted DSL Abstract Executed Syntax Model (metamodel) Dynamic analysis services Model State State Tracer Definition Debugger Target interpreter ... Execution Steps Steps Definition runtime data Interpretation Rules dependency Model conforms to Engine Procedure input/output 14/67

  15. Example of an Interpreted DSL Abstract Syntax Model State Definition * Net transitions places imports run(Net) : while there is an enabled transition, fires it. * merges Place fire(Transition) : removes a token from each input Place Place Transition input tokens: Integer and adds one to each output Place. 1..* name: String name: String output Interpretation rules (summarized) initialTokens: Integer 1..* 15/67

  16. Example of an Interpreted DSL Abstract Syntax Model State Definition * Net transitions places imports run(Net) : while there is an enabled transition, fires it. * merges Place fire(Transition) : removes a token from each input Place Place Transition input tokens: Integer and adds one to each output Place. 1..* name: String name: String output Interpretation rules (summarized) initialTokens: Integer 1..* A p4 p2 t2 p1 t1 p3 t3 p5 16/67

  17. Example of an Interpreted DSL Abstract Syntax Model State Definition * Net transitions places imports run(Net) : while there is an enabled transition, fires it. * merges Place fire(Transition) : removes a token from each input Place Place Transition input tokens: Integer and adds one to each output Place. 1..* name: String name: String output Interpretation rules (summarized) initialTokens: Integer 1..* run(net) fire(t1) fire(t2) fire(t3) model A state 1 2 3 4 5 6 foo() A C B D step p4 p4 p4 p4 p2 t2 p2 p2 p2 t2 t2 t2 observation 1 point p1 t1 p1 t1 p1 t1 p1 t1 p3 t3 p5 p3 t3 p5 p3 t3 p5 p3 t3 p5 17/67

  18. Example of an Interpreted DSL Abstract Syntax Model State Definition * Net transitions places imports run(Net) : while there is an enabled transition, fires it. * merges Place fire(Transition) : removes a token from each input Place Place Transition input tokens: Integer and adds one to each output Place. 1..* name: String name: String output Interpretation rules (summarized) initialTokens: Integer 1..* run(net) fire(t1) fire(t2) fire(t3) model A state 1 2 3 4 5 6 foo() A C B D step p4 p4 p4 p4 p2 t2 p2 p2 p2 t2 t2 t2 observation 1 point p1 t1 p1 t1 p1 t1 p1 t1 p3 t3 p5 p3 t3 p5 p3 t3 p5 p3 t3 p5 Dynamic Analysis 18/67

  19. Debugging/Tracing an interpreted model in the GEMOC Studio 19/67

  20. Question What about DSLs built with a compiler (eg. a code generator) instead of an interpreter? 20/67

  21. Model execution with a compiled DSL dependency Model conforms to Procedure input/output 21/67

  22. Model execution with a compiled DSL Compiled DSL dependency Model conforms to Procedure input/output 22/67

  23. Model execution with a compiled DSL Compiled DSL Source Abstract Syntax dependency Model conforms to Procedure input/output 23/67

  24. Model execution with a compiled DSL Compiled DSL Compiler Source Abstract Syntax dependency Model conforms to Procedure input/output 24/67

  25. Model execution with a compiled DSL Target Language Compiled DSL (interpreted) Compiler Source Target Abstract Abstract Syntax Syntax Target Model State Definition Target interpreter Target Execution Steps Definition Interpretation Rules dependency Model conforms to Target Engine Procedure input/output 25/67

  26. Model execution with a compiled DSL Target Language Compiled DSL (interpreted) Compiler Source Target Source Abstract Abstract Model Syntax Syntax Target Model State Definition Target interpreter Target Execution Steps Definition Interpretation Rules dependency Model conforms to Target Engine Procedure input/output 26/67

  27. Model execution with a compiled DSL Target Language Compiled DSL (interpreted) Compiler Source Target Source Target Abstract Abstract Model Model Syntax Syntax Target Model State Definition Target interpreter Target Execution Steps Definition Interpretation Rules dependency Model conforms to Target Engine Procedure input/output 27/67

  28. Model execution with a compiled DSL Target Language Compiled DSL (interpreted) Compiler Source Target Source Target Abstract Abstract Model Model Syntax Syntax Dynamic analysis services Target Target Model State Tracer State Definition Debugger Target interpreter ... Target Source Target Execution Steps Steps Steps Target Definition runtime data Interpretation Rules dependency Model conforms to Target Engine Procedure input/output 28/67

  29. Example of a compiled DSL (1) AD abstract syntax Activity <<abstract>> nodes edges NamedElement * * +name: String <<abstract>> Edge Node source outgoing 1 * target incoming 1 * InitialNode Action ForkNode JoinNode FinalNode imports : Creates a Net transformActivity(Activity) Petri nets : Creates a Place transformEdge(Edge) abstract : Creates a Place and two Transitions transformAction(Action) imports syntax ... Compiler (summarized) 29/67

  30. Example of a compiled DSL (2) e5 e3 B e1 e2 e7 A Init C e6 e4 End F J Source activity diagram 30/67

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend