Using the Meta-Environment
for Model-Driven Engineering
Tijs van der Storm, Ph.D.
Centrum voor Wiskunde en Informatica
sto...
26th August 2008 Using the Meta-Environment for MDE 2
Introduction
 Me: Tijs van der Storm
 Researcher (CWI) / teacher (...
26th August 2008 Using the Meta-Environment for MDE 3
The Meta-Environment
a programming environment for languages
26th August 2008 Using the Meta-Environment for MDE 4
ASF+SDF Meta-Environment
ASF+SDF
ASF: Algebraic Specification Formal...
26th August 2008 Using the Meta-Environment for MDE 5
Introducing the Meta-
Environment
...in counterpoint with Smalltalk
26th August 2008 Using the Meta-Environment for MDE 6
Smalltalk
Everything is an object
26th August 2008 Using the Meta-Environment for MDE 7
ASF+SDF Meta-Environment
Everything is (parsed) “source code”
(also ...
26th August 2008 Using the Meta-Environment for MDE 8
Terms are trees
 ...parse trees
 ASTs with layout
26th August 2008 Using the Meta-Environment for MDE 9
Smalltalk
Every object has a class
26th August 2008 Using the Meta-Environment for MDE 10
ASF+SDF Meta-Environment
All source code has syntax
(defined by con...
26th August 2008 Using the Meta-Environment for MDE 11
SDF: Syntax Definition
Formalism
 Similar to EBNF
 Modular
 Arbi...
26th August 2008 Using the Meta-Environment for MDE 12
Smalltalk
All computation occurs through messages
26th August 2008 Using the Meta-Environment for MDE 13
ASF+SDF Meta-Environment
All computation is transformation
(describ...
26th August 2008 Using the Meta-Environment for MDE 14
ASF: Algebraic Specification
Formalism
 Concrete syntax
 Match
 ...
26th August 2008 Using the Meta-Environment for MDE 15
Smalltalk
The language = the environment
26th August 2008 Using the Meta-Environment for MDE 16
ASF+SDF Meta-Environment
Languages are environment contracts
(envir...
26th August 2008 Using the Meta-Environment for MDE 17
Integration in the environment
 Little languages
 Errors
 Facts
...
26th August 2008 Using the Meta-Environment for MDE 18
ASF+SDF Meta-Environment
What does it have to do with MDE?
26th August 2008 Using the Meta-Environment for MDE 19
What is MDE anyway?
OMeta
Magritte
Fame
MBA Smalltalk
26th August 2008 Using the Meta-Environment for MDE 20
Model driven engineering
 Domain specific notations
 graphical
 ...
26th August 2008 Using the Meta-Environment for MDE 21
MDE & the Meta-Environment
MetaModel
Model
System
represented by
co...
26th August 2008 Using the Meta-Environment for MDE 22
A little language for Markup
M
arkaby
programmatic HTML
26th August 2008 Using the Meta-Environment for MDE 23
A simple example
26th August 2008 Using the Meta-Environment for MDE 24
Recursive menus
26th August 2008 Using the Meta-Environment for MDE 25
Waebric tool architecture
Waebric
grammar
Evaluator
Compiler
Format...
26th August 2008 Using the Meta-Environment for MDE 26
Demo
26th August 2008 Using the Meta-Environment for MDE 27
Results: Source Lines of Code
Component SDF ASF Total SLOC
Java gra...
26th August 2008 Using the Meta-Environment for MDE 28
Summary
 Meta-Environment
 All data has syntax
 All computation ...
26th August 2008 Using the Meta-Environment for MDE 29
Thank you!
 Questions?
 More info:
 http://meta-environment.org
...
26th August 2008 Using the Meta-Environment for MDE 30
END
Upcoming SlideShare
Loading in …5
×

Using the Meta-Environment for Model-Driven Engineering

518 views

Published on

Using the Meta-Environment for Model-Driven Engineering. Tijs van der Storm. ESUG 2008, Amsterdam

Published in: Technology
  • Be the first to comment

Using the Meta-Environment for Model-Driven Engineering

  1. 1. Using the Meta-Environment for Model-Driven Engineering Tijs van der Storm, Ph.D. Centrum voor Wiskunde en Informatica storm@cwi.nl http://homepages.cwi.nl/~storm
  2. 2. 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)
  3. 3. 26th August 2008 Using the Meta-Environment for MDE 3 The Meta-Environment a programming environment for languages
  4. 4. 26th August 2008 Using the Meta-Environment for MDE 4 ASF+SDF Meta-Environment ASF+SDF ASF: Algebraic Specification Formalism SDF: Syntax Definition Formalism
  5. 5. 26th August 2008 Using the Meta-Environment for MDE 5 Introducing the Meta- Environment ...in counterpoint with Smalltalk
  6. 6. 26th August 2008 Using the Meta-Environment for MDE 6 Smalltalk Everything is an object
  7. 7. 26th August 2008 Using the Meta-Environment for MDE 7 ASF+SDF Meta-Environment Everything is (parsed) “source code” (also called “terms”)
  8. 8. 26th August 2008 Using the Meta-Environment for MDE 8 Terms are trees  ...parse trees  ASTs with layout
  9. 9. 26th August 2008 Using the Meta-Environment for MDE 9 Smalltalk Every object has a class
  10. 10. 26th August 2008 Using the Meta-Environment for MDE 10 ASF+SDF Meta-Environment All source code has syntax (defined by context-free grammars)
  11. 11. 26th August 2008 Using the Meta-Environment for MDE 11 SDF: Syntax Definition Formalism  Similar to EBNF  Modular  Arbitrary CFGs  GLR parsing  Scannerless  Disambiguation
  12. 12. 26th August 2008 Using the Meta-Environment for MDE 12 Smalltalk All computation occurs through messages
  13. 13. 26th August 2008 Using the Meta-Environment for MDE 13 ASF+SDF Meta-Environment All computation is transformation (described using rewrite rules)
  14. 14. 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 = x x * 1 = x x * (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:
  15. 15. 26th August 2008 Using the Meta-Environment for MDE 15 Smalltalk The language = the environment
  16. 16. 26th August 2008 Using the Meta-Environment for MDE 16 ASF+SDF Meta-Environment Languages are environment contracts (environment knows about some languages)
  17. 17. 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
  18. 18. 26th August 2008 Using the Meta-Environment for MDE 18 ASF+SDF Meta-Environment What does it have to do with MDE?
  19. 19. 26th August 2008 Using the Meta-Environment for MDE 19 What is MDE anyway? OMeta Magritte Fame MBA Smalltalk
  20. 20. 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”
  21. 21. 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
  22. 22. 26th August 2008 Using the Meta-Environment for MDE 22 A little language for Markup M arkaby programmatic HTML
  23. 23. 26th August 2008 Using the Meta-Environment for MDE 23 A simple example
  24. 24. 26th August 2008 Using the Meta-Environment for MDE 24 Recursive menus
  25. 25. 26th August 2008 Using the Meta-Environment for MDE 25 Waebric tool architecture Waebric grammar Evaluator Compiler Formatter Importer Checker XML grammar Java grammar Fact extractor XML formatter = dependency
  26. 26. 26th August 2008 Using the Meta-Environment for MDE 26 Demo
  27. 27. 26th August 2008 Using the Meta-Environment for MDE 27 Results: Source Lines of Code Component SDF ASF Total SLOC Java grammar 1583 0 1583 XML grammar (w/o DTDs) 109 0 109 248 0 248 Evaluator 348 685 1033 Compiler 277 611 888 Import resolver 106 87 193 Checker 131 174 305 Fact extractor 84 119 203 129 43 172 XHTML formatter 50 100 150 3065 1819 4884 Waebric grammar Waebric formatter
  28. 28. 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
  29. 29. 26th August 2008 Using the Meta-Environment for MDE 29 Thank you!  Questions?  More info:  http://meta-environment.org  storm@cwi.nl to be released soon...
  30. 30. 26th August 2008 Using the Meta-Environment for MDE 30 END

×