Date post: | 17-Jan-2016 |
Category: |
Documents |
Upload: | lizbeth-henderson |
View: | 215 times |
Download: | 0 times |
Visual Specification of a DSL Processor Debugger
Tamás Mészáros and Tihamér Levendovszky
Budapest University of Technology and Economics
Overview Defining the Dynamic Behavior of Graphical
DSLs Animation Framework
A Case Study Graph transformation debugger
Building DSLs Abstract syntax (rules of the language)
Metamodeling
Concrete syntax (visual appearance) Annotations to metamodel
Textual languages
DSL + processing
Dynamic behavior?
Defining Dynamic Behavior Annotation to metamodel
Textual programming language constructs
DSL Visual Modeling and Transformation System
(VMTS) Animation Framework
THE VMTS ANIMATION FRAMEWORK
Part I.
Animation Framework Overview
PortPN PortTimer PortViews PortModels
GetDiagramView Default
Selecting
GettingView
Highlighting
Firing
[no fireable transitions]
PortPN:EventGetFireableTransition
[fireable transition]
PortViews:EventGetView
[PortViews:EventGetView_]
PortViews:EventHighlight
[PortTimer:Tick]
[PortTimer:Tick]
PortPN:EventFire
PortViews:UnHighlight
EH
_UI (
…)
PNAnimator
PortModels PortViews PortPN PortTimer
Por
tMo
dels
Po
rtV
iew
s
EH
_PetriN
et (…)
PortP
N
EH
_Tim
er (…)
PortT
imer
Initialize
EH_GT
PortGT
ProcessNextCFEdge
ProcessStartNode
Matching
ApplyCurrentMatch
ApplyInternalCausalities
ApplyInternalCausality
Initialized
PreNextCFEdge
PostNextCFEdge
PreStartNode
PostStartNode
PreDecision
PreEndNode
PreRuleNode
PreInitMatch
PreMatching
PreApplyMultipleMatch
PreApplyCurrentMatch
PreInternalCausalities
PreInternalCausality
PostInternalCausality
PostInternalCausalities
PostApplyCurrentMatch
PostApplyMultipleMatch
PostRuleNode
AgsiCFEdge
InternalCausalityResult
AgsiCFEndNode
TrafoOutputPlaces
AgsiInternalCausality
IAgsiCFNode
AgsiRuleExecutionResults
Animator state machineHigh level animation model
Event handler modelEvent handler
implementation
Animated model
.
Animation engine
apply
gen.
ref.
EN
VIR
ON
ME
NT
.
Domain knowledge and simulation engines
VMTS Animation Framework Separating animation from model simulation
The domain knowledge is considered black-box
Animation logic is described with an event-driven state machine
Integration with an event-driven approach
The integration is supported with visual modeling techniques
Processing animation models Generating skeleton for event handlers
Generating executable application from animator models
VMTS Animation Framework Event handler model
Event-driven interface for external components
Elements Events Entites ( event parameters) Ports
EventGetEnabledTransition
EventFireTransition
EventGetEnabledTransition_
EventFireTransition_
DiagramModel
ShapeModel
EH_PetriNet
PortPN
PNModel
Transition
Transition
Transition
Port
Event Entity
EventHandler
Handles
OperatesOn
VMTS Animation Framework Animator
Event-driven state machine
Port-based interface
States
Transitions Guard expression Action expression
PortPN PortTimer PortViews PortModels
GetDiagramView Default
Selecting
GettingView
Highlighting
Firing
[no enabled transitions]
PortPN:EventGetEnabledTransition
[enabled transition]
PortViews:EventGetView
[PortViews:EventGetView_]
PortViews:EventHighlight
[PortTimer:Tick]
[PortTimer:Tick]
PortPN:EventFire
PortViews:UnHighlight
VMTS Animation Framework High Level Animation Model
Event handler
Animator
Port
Event route
EH
_UI (
…)
PNAnimator
PortModels PortViews PortPN PortTimerP
ortM
ode
lsP
ort
Vie
ws
EH
_PetriN
et (…)
Po
rtPN
EH
_Tim
er (…)
PortT
imer
EventRoute
Port
EventHandler
Animator
THE VMTS TRANSFORMATION DEBUGGER
Part II.
Graph rewritingRewriting rule
Host graph
VMTS model transformation engine Graph rewriting-based approach
Rewriting rules Searching for graph patterns (LHS graph) Replacing matches with a substitue pattern (RHS)
Control sequence Visual Control Flow Language
Rule application Conditional branching Exhaustive rule application Parameter passing between rules
Model transformation debugger Goals
Visualization of input and output models
Animating the Control Flow model
Visualizing the executed rewriting rule
Continuous and step-by-step execution, breakpoints, jumping in the Control Flow
Online editing of input and output models
Model transformation debugger Event handler model
Wrapping the transformation engine
Initialize
EH_GT
PortGT
ProcessNextCFEdge
ProcessStartNode
Matching
ApplyCurrentMatch
ApplyInternalCausalities
ApplyInternalCausality
Initialized
PreNextCFEdge
PostNextCFEdge
PreStartNode
PostStartNode
PreDecision
PreEndNode
PreRuleNode
PreInitMatch
PreMatching
PreApplyMultipleMatch
PreApplyCurrentMatch
PreInternalCausalities
PreInternalCausality
PostInternalCausality
PostInternalCausalities
PostApplyCurrentMatch
PostApplyMultipleMatch
PostRuleNode
AgsiCFEdge
InternalCausalityResult
AgsiCFEndNode
TrafoOutputPlaces
AgsiInternalCausality
IAgsiCFNode
AgsiRuleExecutionResults
Model transformation debugger High-level animation model
Event handlers UI, GT, Timer
Animators GT, Highlight,
hotkey E
H_U
I (…
)
E
SIM_GT
PortModels PortLayout PortPeripher PortViews PortGT PortTimer
EH
_GT
(…)
EH
_Tim
er (…)
Por
tMod
els
Por
tLay
out
Por
tPer
iphe
rP
ortV
iew
s
PortG
TP
ort
SIM_GT
PortPeripherPortViews PortGT
SIM_Shortcut
PortPeripher PortTimer
HighlightGT
Model transformation debugger State machine model (SIM_GT)
1) Init
2) Idle
3) Process start
4) Process edge Breakpoint
5) Process rule node
6) Decision node
7) End node
PortGT PortViews PortModels PortLayout PortTimer
Initializing
ApplyLayout
OpenHostAndCF
GetCFDiagram
GetHostDiagram
GetWindowContent
ProcessingStart
HighlightStartNode
Executing
ShowResults
ApplyCurrentMatch
HighlightMatch
HighlightEdge HighlightDecisionProcessEndNode
HighlightRuleNode
CheckBreakpoint
ApplyBreakpointGetNewCFEdge ProcessEdge
(1)
(2)
(3)
(5)
(4)
(6)(7)
Debugger – in action
Summary
PortPN PortTimer PortViews PortModels
GetDiagramView Default
Selecting
GettingView
Highlighting
Firing
[no fireable transitions]
PortPN:EventGetFireableTransition
[fireable transition]
PortViews:EventGetView
[PortViews:EventGetView_]
PortViews:EventHighlight
[PortTimer:Tick]
[PortTimer:Tick]
PortPN:EventFire
PortViews:UnHighlight
EH
_UI (
…)
PNAnimator
PortModels PortViews PortPN PortTimer
Por
tMo
dels
Po
rtV
iew
s
EH
_PetriN
et (…)
PortP
N
EH
_Tim
er (…)
PortT
imer
Initialize
EH_GT
PortGT
ProcessNextCFEdge
ProcessStartNode
Matching
ApplyCurrentMatch
ApplyInternalCausalities
ApplyInternalCausality
Initialized
PreNextCFEdge
PostNextCFEdge
PreStartNode
PostStartNode
PreDecision
PreEndNode
PreRuleNode
PreInitMatch
PreMatching
PreApplyMultipleMatch
PreApplyCurrentMatch
PreInternalCausalities
PreInternalCausality
PostInternalCausality
PostInternalCausalities
PostApplyCurrentMatch
PostApplyMultipleMatch
PostRuleNode
AgsiCFEdge
InternalCausalityResult
AgsiCFEndNode
TrafoOutputPlaces
AgsiInternalCausality
IAgsiCFNode
AgsiRuleExecutionResults
Animator state machineHigh level animation model
Event handler modelEvent handler
implementation
Animated model
.
Animation engine
apply
gen.
ref.
EN
VIR
ON
ME
NT
.
Domain knowledge and simulation engines
Thank you for your attention!
http://vmts.aut.bme.hu