Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

EcoreTools-Next: Executable DSL made (more) accessible


Published on

Various Eclipse Modeling technologies are trying to empower domain experts in the creation of specific tools. Using EcoreTools and Sirius a domain expert can define languages, graphical modelers and editors without writing a single line of Java code or launching a new Eclipse runtime. However, when come the time to add behaviors to the language structure (e.g., to implement interpreters, compilers, static analysis, refactoring, or generators), the domain expert has to face all the complexity of Eclipse Plugin development, OSGi, Java and much more.

This is a no-go in some contexts and as such there was a sweet spot for a new technology in Eclipse Modeling that support a seamless mechanism to weave behaviors across (Ecore-based) language structure.

This talk will present an integrated approach for weaving behavior of domain specific languages right from the EcoreTools modeler, that can be automatically applied to conforming models while having the following novel characteristics:

Domain experts are able to weave the behaviors across the language structure, seamlessly supporting the definition of a visitors for any kind of purposes.
No need for code generation, any change is instantly reflected and can be tested right away, even on Dynamic Instances
Strong optional validation, fast evaluation
"on demand" extension through Java services
behavior definition which is non-intrusive to the Ecore model
complemented by a first prototype of a dual compiler that seamlessly complement the EMF generation results.
The talk will demo the creation of a DSL and its behavior through the use of these plugins which are extending EcoreTools. The design of the language will also be discussed as it is embeds the Eclipse "aql" query language, leverage union types and type inference and can itself be integrated in other contexts. The audience will leave with a clear understanding of how they could define the behavior of their DSL using this technology, how it compares to approaches like Xcore/Xbase and when it could be part of the Eclipse release.

The technology is currently considered as good enough for experimenting and is being contributed to Eclipse Modeling through the EcoreTool project.

Published in: Software
  • Be the first to comment

  • Be the first to like this

EcoreTools-Next: Executable DSL made (more) accessible

  1. 1. EcoreTools-Next: Executable DSL made (more) accessible Cédric Brun, Obeo Yvan Lussaud, Obeo Benoit Combemale, Univ. Rennes 1 Fabien Coulon, Univ. Rennes 1
  2. 2. 2 Executable DSL ➢ Interpreter ➢ Compiler ➢ Model Transformation ➢ Static Model Analysis ➢ Etc ...
  3. 3. 3 ALE : Action Language for EMF Complement an Ecore metamodel ➢ with Runtime Data ➢ by implementing EOperation
  4. 4. 4 What is ALE ? Ale is a type of beer brewed using a warm fermentation method, resulting in a sweet, full-bodied and fruity taste. – Wikipedia
  5. 5. 5 What is ALE ? Integrated to EcoreTools Define behavior over metamodel ➢ Interpreted Language ➢ Static typing, type inference ➢ Open class support open class FSM { def void foo() { State currentState := … ; if (currentState.oclIsKindOf(Initial)) { Initial state := currentState; //valid statement } } } Action Language for EMF
  6. 6. 6 Design Ecore metamodel is easy Thanks EcoreTools !
  7. 7. 7 MiniFSM
  8. 8. 8 Write implementation is not that easy ➢ Modify generated code ➢ Configure the code generation ➢ Use delegation mechanism ➢ Use the generated Switch ➢ Use other tools Generate code and then:
  9. 9. 9 Write implementation is not that easy ➢ Modify generated code ➢ Configure the code generation ➢ Use delegation mechanism ➢ Use the generated Switch ➢ Use other tools You have to master the compilation chain Generate code and then:
  10. 10. 10 Code generation step Can’t design .ecore & test implementation in parallel
  11. 11. 11 Code generation step Run another Eclipse Can’t design .ecore & test implementation in parallel
  12. 12. 12 Code generation step Run another Eclipse Can’t design .ecore & test implementation in parallel … 20 times a day
  13. 13. 13 Quick Design-Run cycle with ALE Interpreted behavior Just run it ! No code Generation needed No plugin deployment needed
  14. 14. 14 Demo#1 ➢ Implement an EOperation ➢ Run an xDSL
  15. 15. 15 ALE is two things: ➢ Open Class ➢ Action Language
  16. 16. 16 Separate concerns ➢ Abstract syntax ➢ Semantic (Runtime data & Behavior) Ecore Open Class
  17. 17. 17 Demo#2 ➢ Re-open FSM EClass ➢ Add currentState feature
  18. 18. 18 ALE is two things: ➢ Open Class ➢ Action Language
  19. 19. 19 AQL ● EMF Language in Eclipse Acceleo – Navigate & Query model – Lightning speed evaluation, strong validation ● Expression ● Lambda ● Easy extension through services mechanism ● Interpreted – No code generation needed (x.tokens > 0) or ( x.tokens = -1) | elem.tokens = -1) obj.myNewService() Acceleo Query Language
  20. 20. 20 ALE extends AQL AQL is an expression language ➢ No side effects ➢ Assignements ➢ More control flow ➢ Multi-inheritance ➢ Runtime data ➢ Type inference ALE provides :
  21. 21. 21 Demo #3: make executable FSM in 10 minutes
  22. 22. 22 Summary ➢ Made an Executable FSM from scratch Beyound this presentation ➢ Website ➢ Animated execution & Debugger Perspectives ➢ Maturate to industrial grade Contribution to EcoreTools ➢ Compiler: Open class to Java code
  23. 23. 23 Thank you!