8 th DSM Workshop Undoing Operational Steps of Domain-Specific - - PowerPoint PPT Presentation
8 th DSM Workshop Undoing Operational Steps of Domain-Specific - - PowerPoint PPT Presentation
8 th DSM Workshop Undoing Operational Steps of Domain-Specific Modeling Languages Tim Hartmann , Daniel A. Sadilek Humboldt-Universitt zu Berlin Outline Introduction Development of executable DSMLs Animated execution
Outline
- Introduction
– Development of executable DSMLs – Animated execution – Operational semantics
- Undoing operational steps
- Open issues
- Conclusion
2/20
Use Case: DSML Development
Draft Prototype Evaluation
Carl Adam Petri
- Metamodel
- Graphical editor
- Operational
semantics
Language engineer
Iterative development cycle
Error
3/20
4/20
5/20
2nd Iteration of DSML Development Example
Prototype Evaluation
Carl Adam Petri Language engineer
Draft
- Metamodel
- Graphical editor
- Corrected
- perational semantics
Iterative development cycle
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
protected void run(Net net) { Transition t = getActivated(net); if (t != null) { consume(t.getSrc.get(0)); produce(t.getSnk.get(0)); } } }
10/20
Part of Petri Net Java semantics (erroneous version)
Transition Transformation
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
Part of Petri Net Java semantics (corrected version)
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
Configuration
Execution Editor
1
Configuration
2
perform step user input
3 undo step
Command Order
Configuration
X
undo step undo input
16/20
Synchronization
Configuration
Execution Editor
1
Configuration
2
user input perform step visualize read values
X
transition transformation
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
- Implementation experience: many building
blocks available in EMF
step back
19/20
8th DSM Workshop
Undoing Operational Steps of Domain-Specific Modeling Languages
Discussion
Tim Hartmann, Daniel A. Sadilek Humboldt-Universität zu Berlin
20/20