8 th DSM Workshop Undoing Operational Steps of Domain-Specific Modeling Languages Tim Hartmann , Daniel A. Sadilek Humboldt-Universität zu Berlin
Outline ● Introduction – Development of executable DSMLs – Animated execution – Operational semantics ● Undoing operational steps ● Open issues ● Conclusion 2/20
Use Case: DSML Development Draft Language engineer Carl Adam Petri Prototype ● Metamodel ● Graphical editor Iterative ● Operational development cycle semantics Evaluation Error 3/20
4/20
5/20
2 nd Iteration of DSML Development Example Draft Language engineer Carl Adam Petri Prototype ● Metamodel ● Graphical editor Iterative ● Corrected development cycle operational semantics Evaluation 6/20
Operational Semantics ● Interpretable operational semantics ● Transition system: 〈 , 〉 ● Configurations: ● Transition relation: ⊆× 7/20
Operational Semantics ● Configurations are represented as models: { , , ...} . ∈ ● Configurations are defined by a metamodel ● Transition relation can be defined with a model-to-model transformation 8/20
Configuration Metamodel Petri Net example 9/20
Transition Transformation Part of Petri Net Java semantics (erroneous version) protected void run(Net net) { Transition t = getActivated(net); if (t != null ) { consume(t.getSrc.get(0)); produce(t.getSnk.get(0)); } } } 10/20
Transition Transformation Part of Petri Net Java semantics (corrected version) protected void run(Net net) { Transition t = getActivated(net); if (t != null ) { for (Place p : t.getSrc()) { consume(p); } for (Place p : t.getSnk()) { produce(p); } } } 11/20
12/20
13/20
14/20
Undoing Operational Steps ● Undo: reverse changes ● Observer for model changes ● Execution step: single unit of work ● Composition of elementary changes ● Change history: ● Shared command stack for editor and execution 15/20
Command Order Editor Execution 1 X Configuration perform step undo step undo step 2 Configuration user input undo input 3 16/20 Configuration
Synchronization Editor Execution 1 Configuration transformation read values transition user input X perform step visualize 2 Configuration 17/20
Open Issues ● Breakpoints between execution steps ● Declarative breakpoint description? ● Users can produce invalid configurations ● How to describe and implement constraints? ● Changing operational semantics can affect previous configurations ● How to step back to last state that is consistent with changed semantics? 18/20
Conclusion ● New debug feature for DSML prototyping ● Adapting undo of editors for stepwise model execution step back ● Implementation experience: many building blocks available in EMF 19/20
8 th DSM Workshop Undoing Operational Steps of Domain-Specific Modeling Languages Discussion Tim Hartmann, Daniel A. Sadilek Humboldt-Universität zu Berlin 20/20
Recommend
More recommend