using the meta-environment for model-driven engineering
DESCRIPTION
Using the Meta-Environment for Model-Driven Engineering. Tijs van der Storm. ESUG 2008, AmsterdamTRANSCRIPT
![Page 1: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/1.jpg)
Using the Meta-Environment for Model-Driven Engineering
Tijs van der Storm, Ph.D.Centrum voor Wiskunde en [email protected]://homepages.cwi.nl/~storm
![Page 2: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/2.jpg)
26th August 2008 Using the Meta-Environment for MDE 2
Introduction
Me: Tijs van der Storm Researcher (CWI) / teacher (UvA) Interests:
Software evolution Programming languages
Today: Using the Meta-Environment... for Model Driven Engineering (MDE)
![Page 3: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/3.jpg)
26th August 2008 Using the Meta-Environment for MDE 3
The Meta-Environment
a programming environment for languages
![Page 4: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/4.jpg)
26th August 2008 Using the Meta-Environment for MDE 4
ASF+SDF Meta-Environment
ASF+SDF
ASF: Algebraic Specification FormalismSDF: Syntax Definition Formalism
![Page 5: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/5.jpg)
26th August 2008 Using the Meta-Environment for MDE 5
Introducing the Meta-Environment
...in counterpoint with Smalltalk
![Page 6: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/6.jpg)
26th August 2008 Using the Meta-Environment for MDE 6
Smalltalk
Everything is an object
![Page 7: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/7.jpg)
26th August 2008 Using the Meta-Environment for MDE 7
ASF+SDF Meta-Environment
Everything is (parsed) “source code”(also called “terms”)
![Page 8: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/8.jpg)
26th August 2008 Using the Meta-Environment for MDE 8
Terms are trees
...parse trees ASTs with layout
![Page 9: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/9.jpg)
26th August 2008 Using the Meta-Environment for MDE 9
Smalltalk
Every object has a class
![Page 10: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/10.jpg)
26th August 2008 Using the Meta-Environment for MDE 10
ASF+SDF Meta-Environment
All source code has syntax(defined by context-free grammars)
![Page 11: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/11.jpg)
26th August 2008 Using the Meta-Environment for MDE 11
SDF: Syntax Definition Formalism Similar to EBNF Modular Arbitrary CFGs
GLR parsing Scannerless Disambiguation
![Page 12: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/12.jpg)
26th August 2008 Using the Meta-Environment for MDE 12
Smalltalk
All computation occurs through messages
![Page 13: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/13.jpg)
26th August 2008 Using the Meta-Environment for MDE 13
ASF+SDF Meta-Environment
All computation is transformation(described using rewrite rules)
![Page 14: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/14.jpg)
26th August 2008 Using the Meta-Environment for MDE 14
ASF: Algebraic Specification Formalism Concrete syntax
Match Construct
Term rewriting Purely functional Automatic traversal
traversal functions
x + 0 = xx * 1 = xx * (y + z) = x * y + x * z
if !x then S1 else S2 = if x then S2 else S1
compile(while x do S) = LOOP: load x; jz END; compile(S); jmp LOOP; END:
![Page 15: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/15.jpg)
26th August 2008 Using the Meta-Environment for MDE 15
Smalltalk
The language = the environment
![Page 16: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/16.jpg)
26th August 2008 Using the Meta-Environment for MDE 16
ASF+SDF Meta-Environment
Languages are environment contracts(environment knows about some languages)
![Page 17: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/17.jpg)
26th August 2008 Using the Meta-Environment for MDE 17
Integration in the environment
Little languages Errors Facts Formatting ...
Easily extended Define a language + GUI plugin
![Page 18: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/18.jpg)
26th August 2008 Using the Meta-Environment for MDE 18
ASF+SDF Meta-Environment
What does it have to do with MDE?
![Page 19: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/19.jpg)
26th August 2008 Using the Meta-Environment for MDE 19
What is MDE anyway?
OMeta
Magritte
Fame
MBA Smalltalk
![Page 20: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/20.jpg)
26th August 2008 Using the Meta-Environment for MDE 20
Model driven engineering
Domain specific notations graphical textual
Transformation code generation model-to-model “compilation”
![Page 21: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/21.jpg)
26th August 2008 Using the Meta-Environment for MDE 21
MDE & the Meta-Environment
MetaModel
Model
System
represented by
conforms to
Meta MetaModel Grammar
Source code
System
Grammar of Grammars
Adapted from: Jean Bézivin, On the Unification Power of Models, UML 2003
![Page 22: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/22.jpg)
26th August 2008 Using the Meta-Environment for MDE 22
A little language for Markup
Markaby programmatic HTML
![Page 23: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/23.jpg)
26th August 2008 Using the Meta-Environment for MDE 23
A simple example
![Page 24: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/24.jpg)
26th August 2008 Using the Meta-Environment for MDE 24
Recursive menus
![Page 25: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/25.jpg)
26th August 2008 Using the Meta-Environment for MDE 25
Waebric tool architecture
Waebricgrammar Evaluator
Compiler
Formatter
Importer Checker
XMLgrammar
Javagrammar
Factextractor
XMLformatter
= dependency
![Page 26: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/26.jpg)
26th August 2008 Using the Meta-Environment for MDE 26
Demo
![Page 27: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/27.jpg)
26th August 2008 Using the Meta-Environment for MDE 27
Results: Source Lines of Code
Component SDF ASF Total SLOCJava grammar 1583 0 1583XML grammar (w/o DTDs) 109 0 109
248 0 248Evaluator 348 685 1033Compiler 277 611 888Import resolver 106 87 193Checker 131 174 305Fact extractor 84 119 203
129 43 172XHTML formatter 50 100 150
3065 1819 4884
Waebric grammar
Waebric formatter
![Page 28: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/28.jpg)
26th August 2008 Using the Meta-Environment for MDE 28
Summary
Meta-Environment All data has syntax All computation is transformation Languages are environment contracts
MDE = DSL engineering (a.o.) Waebric case-study
![Page 29: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/29.jpg)
26th August 2008 Using the Meta-Environment for MDE 29
Thank you!
Questions? More info:
http://meta-environment.org [email protected]
to be released soon...
![Page 30: Using the Meta-Environment for Model-Driven Engineering](https://reader031.vdocuments.net/reader031/viewer/2022012922/54be5d974a79596e5b8b45ba/html5/thumbnails/30.jpg)
26th August 2008 Using the Meta-Environment for MDE 30
END