Title: Institute for Computer Science Chair IV: Software
1How to represent Models, Languages and
Transformations?
- Martin Feilkas
- Workshop on Domain-Specific Modeling
- Oct. 22nd, 2006
2Whats the difference?
Respresentation
textual
graphical
Usage
parsing
syntax-driven construction
grammar
data model
Defined by
3BNF ? ER
4Consequences
- Elimination of redundant information
- ER-modeling is more expressive than context-free
grammars - But still not expressive enough, so constraints
are still needed - ER-models are easier to modify by ordinary
developers - Merging Database synchronisation instead of
pattern matching
5Transformation
- Transformation is a way of to specify semantic
for DSLs (translational semantics) - Nowadays
- Template-based code-generation
- Weak syntax highlighting
- No syntax-respecting code generation (testing)
- Why? Generator-Backends only know that the target
language is textual.
6Transformation
- Translate to the abstract and not to the concrete
syntax - No more differentiation between model-to-model
and model-to-code transformation - Syntax-driven template specification
Component c ? insert Java-Class(Name k.Name,
Visibility"public") jk insert
Constructor(Name jk.Name) Port (Type
"sender") p ? insert Method(Name
c.Name"_"p.Name) Port (Type
"receiver") p ? insert Method(Name
c.Name"_"p.Name),
insert Method(Name "CS"c.Name"_"p.Name
), insert Attribute(Name p.Name,
Typebool) DataElement d ?
GenAttr GenAttr DataElement d ? insert
Attribute(Name d.Name, Typestring)