Automaton-Based Approach for Defining Dynamic Semantics of DSLs
Ulyana Tikhonova
St. Petersburg State Polytechnical University, Russia
Eindhoven University of Technology, The Netherlands
Supervised by: Suzana Andova
Mark van den Brand
Fedor A. Novikov
31/08/2011 1SET
MotivationDomain-Specific Languages
◦design, implementation, maintenanceModel Driven Engineering
31/08/2011
programming languages
verification languages
simulation models
DSL metamodel
transformations
DSL dynamic
semantics
SET
PAGE 3
Motivation
31/08/2011
Domain-Specific Languages◦design, implementation, maintenance
Model Driven Engineering
DSL metamodelDSL dynamic
semantics
programming languages
verification languages
simulation models
transformations
SET
PAGE 4
Automaton-based solutionExecutable dynamic semantics
specificationNotation of UML state machine
diagrams
AutoLanD DSL: executable UML for automata
31/08/2011
SET
PAGE 531/08/2011
DSL
metamodel
DSL dynamic
semantic
s
AutoLanD
Interpretation Code generation
Verification
SET
PAGE 6
The idea in detail
31/08/2011
«instanceOf»
( A = {a, b, c} {c, d, e} )
Semantics
«instanceOf»
interprets
DSL
metamodel
DSL program
Automata
classe
s
Automata
instance
s
network
execut
e
PAGE 7
Solution
31/08/2011
relationships
between
automata and
metamodel
Specified by a DSL designer
Specified by a DSL user
Instantiated
by AVM (automata
virtual machine)
input
M1M0
execut
e
AVM
SET
PAGE 8
Way 1 : generation of java-code
31/08/2011
M1M0
relationships
between
automata and
metamodel
AVM java-class
metamodel java-classes
automata java-classes
DSL
metamodel automat
a
r u n n i n g J a v a
EMF
EMFText +
Xpand
SET
PAGE 9
Way 2 : bootstrapping
31/08/2011
AutoLanD metamodel
Automaton structure
Network
model
AutoLanD
semantics
Relationships between
automata and metamodel
AVM
AutoLanD
programAutomata network
M1M0
AVM’
execut
e
«in
stan
ceO
f»
«in
stan
ceO
f»
input-based generation
input «in
stan
ceO
f»
SET
PAGE 10
ConclusionsAutoLanD is implemented yoo-hoo!
Code generation = programming: rapid implementation + testing
SOS: understanding of the core semantics + reconsidering a DSL designAutoLanD◦Executability Accurate defining of all details◦Design vs. programming
31/08/2011
∑
SET
PAGE 11
Open problemsLanguage for specifying mapping
between metamodel-based input and automata network the higher-leveled definition of an AVM
Bootstrapping is not finishedApplying AutoLanD to some DSL
31/08/2011
SET
PAGE 12
Thank you!
31/08/2011
vlaaai
time?
SET
PAGE 13
AutoLanD metamodel
31/08/2011
SET
PAGE 14
Networkmetamodel
31/08/2011
SET
PAGE 15
AutoLanD semantics: AutoInstance SM
31/08/2011
SET
PAGE 16
AutoLanD semantics: Scheduler SM
31/08/2011
SET
PAGE 17
Scalability
31/08/2011
DSL dynami
c semanti
cs
SET
PAGE 18
Bootstrapping scheme
31/08/2011
Set DSL
metamodel
semantics automata
Set model (program)
«instanceOf»
AutoLanD DSL
metamodel
semantics automata
«instanceOf»
run
run
compila
ti
on
interp
retati
on