SLIDE 1 Arik Hadas
- Dept. of Mathematics and Computer Science
The Open University of Israel
Joint Work With:
David H. Lorenz
Demanding First-Class Equality for Domain Specific Aspect Languages
SLIDE 2 Domain Specific Aspect Languages DSLs DSALs AOP
KALA COOL RIDL AspectGrid Racer AO4SQL
SLIDE 3 DSALs are Second-class
– Not as easy to develop and to use
- Second-class AOP languages
– Incompatible with AOP tools
SLIDE 4
Background
Language workbenches: The killer-app for domain specific languages
abc: an extensible AspectJ compiler 2005 DSAL DSL
SLIDE 5
Background
Language workbenches: The killer-app for domain specific languages
abc: an extensible AspectJ compiler DSAL DSL 2005
SLIDE 6 Background
Language workbenches: The killer-app for domain specific languages
Language workbenches (LW)
– xtext, MPS, Spoofax
AOP composition frameworks (CF)
– Reflex, XAspects,
AWESOME
abc: an extensible AspectJ compiler Since 2005 DSAL DSL 2005
SLIDE 7 Background
Language workbenches: The killer-app for domain specific languages
Language workbenches (LW)
– xtext, MPS, Spoofax
AOP composition frameworks (CF)
– Reflex, XAspects,
AWESOME
abc: an extensible AspectJ compiler Since 2005 DSAL DSL 2005
SLIDE 8 Background
Language workbenches: The killer-app for domain specific languages
Language workbenches (LW)
– xtext, MPS, Spoofax
AOP composition frameworks (CF)
– Reflex, XAspects,
AWESOME
abc: an extensible AspectJ compiler Since 2005 DSAL DSL But no workbench solution for DSALs 2005
SLIDE 9
Language Workbench (LW)
Language Workbench Language Workbench javac javac
DSL Code Java Bytecode
SLIDE 10
Language Workbench (LW)
Language Workbench Language Workbench javac javac
DSL Code Java Bytecode
SLIDE 11
Using LW for DSAL
Language Workbench Language Workbench javac javac
Java Bytecode
No Aspects
DSL Code DSAL Code
SLIDE 12
Using LW for DSAL
Language Workbench Language Workbench javac javac
Java Bytecode
No Aspects
DSL Code DSAL Code
SLIDE 13
LW for AspectJ
Language Workbench Language Workbench
DSAL Code Java AspectJ Bytecode Woven Bytecode javac ajc
No Multiple DSALs
SLIDE 14 DSAL Complexity
- Unlike DSL, DSAL tackles crosscutting
concerns
DSLs DSALs
SLIDE 15
Looking for a DSAL Workbench
Language Workbench AOP Composition Framework
Tools for creation & usage of languages
Defining weaving semantics needed for DSALs
SLIDE 16
Looking for a DSAL Workbench
Language Workbench AOP Composition Framework
Tools for creation & usage of languages
Defining weaving semantics needed for DSALs
Will a naive combination of the two be a proper solution?
SLIDE 17
Naive Combination of LW and CF
Language Workbench Language Workbench
DSAL Code AspectJ Woven Bytecode ajc Composition Framework
First-class DSL
SLIDE 18 But Still Second-class AOP
Language Workbench Language Workbench
DSAL Code AspectJ Woven Bytecode Composition Framework
Browsing Debugging Compiling
SLIDE 19
Traditional LW Architecture
Language Workbench Language Workbench
DSAL Code AspectJ Woven Bytecode
Composition Framework Code Transformation
SLIDE 20
DSAL Workbench Architecture
Composition Framework Composition Framework
DSAL Code Woven Bytecode
Language Workbench Language Workbench
AspectJ DSAL Code
First-class AOP
Code Transformation
SLIDE 21
DSAL Workbench Architecture
Composition Framework Composition Framework
DSAL Code Woven Bytecode
Language Workbench Language Workbench
DSAL Code
Standalone DSAL compiler Can generate debugging & browsing information
First-class AOP
Code Transformation
SLIDE 22
Implementation
AWESOME* AWESOME*
DSAL Code Woven Bytecode
Spoofax Spoofax
DSAL Code
Code Transformation
SLIDE 23
Example: First Class COOL
SLIDE 24 DSAL “Bill of Rights”
- Freedom of Expression
- Syntactic
- Semantic
- Economic Freedom
- Cost effective Implementation
- Cost effective Usage
- Freedom of Assembly
- DSL Interoperability
- Equality with domain-specific
languages and AOP languages
SLIDE 25 Related Work
– [Fowler, 2005] Language workbenches: The killer-app for
domain specific languages.
– [Kats and Visser, 2005] The Spoofax language workbench:
Rules for declarative specification of languages and IDEs.
– [Lorenz and Rosenan, 2011] Cedalion: A language for
language oriented programming.
- AOP Composition Frameworks
– [Kojarski and Lorenz, 2005] Pluggable AOP: Designing aspect
mechanisms for third-party composition.
– [Lorenz and Kojarski, 2007] Understanding aspect interaction,
co-advising and foreign advising.
– [Kojarski and Lorenz, 2007] Awesome: An aspect co-weaving
system for composing multiple aspect-oriented extensions.
SLIDE 26 Conclusion
- A novel design for DSAL workbench that produces
first-class DSAL
– First-class DSL – First-class AOP language
- Prototype comprising Spoofax and AWESOME*
- Plug-in for COOL as a first-class DSAL
SLIDE 27 Arik Hadas and David H. Lorenz
- Dept. of Mathematics and Computer Science
The Open University of Israel
arik.hadas@openu.ac.il
https://github.com/OpenUniversity
Thank You!