Successfully reported this slideshow.

mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds

1

Share

Upcoming SlideShare
A tutorial on EMF-IncQuery
A tutorial on EMF-IncQuery
Loading in …3
×
1 of 21
1 of 21

mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds

1

Share

Download to read offline

Our talk at EclipseCon Europe 2014

http://eclipsecon.org/europe2014/session/mbeddr-meets-incquery-combining-best-features-two-modeling-worlds

Our talk at EclipseCon Europe 2014

http://eclipsecon.org/europe2014/session/mbeddr-meets-incquery-combining-best-features-two-modeling-worlds

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Related Audiobooks

Free with a 14 day trial from Scribd

See all

mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds

  1. 1. MBEDDR MEETS INCQUERY: COMBINING THE BEST FEATURES OF TWO MODELING WORLDS István Ráth Tamás Szabó Budapest University of Technology and Economics Fault Tolerant Systems Research Group
  2. 2. Overview of the talk  Introduction o INCQUERY o mbeddr and MPS  MPS-INCQUERY o A unique integration between Eclipse and non-Eclipse modeling worlds o Adapting a complex Xtext language to a different DSL paradigm  Demo  Lessons learned  Conclusion
  3. 3. EMF-INCQUERY
  4. 4. Model queries  Model queries: “code that retrieves a piece of the model”  Queries are at the heart of MDE o Every model access/read is a (simple) query o More complex: Views, content providers o Most complex: Model transformations, code generators, …
  5. 5. EMF-INCQUERY Overview  A model query engine for batch and live queries http://eclipse.org/incquery • Expressive graph pattern-based language • Built on Xtext and Xbase • Focus on reusability: query libraries, query composition Language • Incremental evaluation based on the Rete algorithm • Instantaneous response for complex queries over large models Execution • Query and Change APIs • Validation • View maintenance • Maven builder for CI Features  Available from the Eclipse Marketplace  Our mission to Mars: 1.0
  6. 6. How INCQUERY works Your tool APIs Features EMF instance model Query specifications Query results Query result delta stream Model modifications Change notifications On-the-fly validation Live views Incremental transformations and code generation Derived features with notifications (Xcore) Incrementality: cost is proportional to change size, rather than model size
  7. 7. An extensible set of integrated languages for embedded software development.
  8. 8. mbeddr  Integrated Languages o Code C language implementation o Higher-level abstractions for C o Tight integration with formal verifications  Extensible Languages o Extend and compose the existing languages easily o Without invasive changes o Use only the set of languages that you need
  9. 9. MPS  Meta Programming System (JetBrains)  Language workbench o A tool that supports the creation, extension and composition of GPLs and DSLs + their IDEs  Development tools are centered around languages o Domain specific tools  Domain specific languages  “Interactive” / Aided AST building
  10. 10. Parsing Projection
  11. 11. MPS-INCQUERY
  12. 12. Motivation  Computing scoping information for content assist  Constraints: restricting containment, scope, referencing  Live view maintenance to support projectional editing o Component diagrams in mbeddr o Block diagrams in a commercial project
  13. 13. The Integration Challenge  EMF-INCQUERY has a very complex Xtext DSL o Xbase (embedded in the language) o Custom type system and inferencer o Strong reliance on cross references for reusability o Lots of non-trivial syntactic and semantic validators  Implementing the INCQUERY language in MPS o Concepts, editors, type system, etc. o Substitute MPS Base Language for Xbase o MPS-style Code generator o Same syntax and same expressive power  Goal: reuse the INCQUERY runtime o As much as possible
  14. 14. Overview of the approach Instance models Languages (meta) Platform (meta meta) IncQuery extensions Java Base Language Queries Derived features Query Explorer IDE content as MPS model MPS-IncQuery Goal 2: Language Notifications Goal 3: Type safe API extensions for INCQUERY features Goal 4: UI extension for visualizing query results (debugging) Goal 1: Queries evaluated directly over MPS models (C code)
  15. 15. DEMO Requirements engineering and tracing in mbeddr  Real world example  Language extensions oWorkpackages (tracking of efforts, required time) o Assessments: small queries on various model elements (reports)
  16. 16. LESSONS LEARNED
  17. 17. Xtext MPS Notation Textual Arbitrary (projectional editing) File Content Readability Simple text Workbench is needed (XML) Version control Usual workflow Workbench is needed for effective version control (Language) Extensibility One linear customization chain Non-trivial customization is hard Easy and flexible (by design) Everything is customizable Grammar ambiguity? Possible Not possible (arbitrary composition)
  18. 18. Xtext MPS Documentation Fundamental concepts are well documented, advanced features are not Editor usability Eclipse text editors Getting used to projectional editing needs time IDE functionality Similar; code completion, type checking, etc. UI extensions (tool) Tightly integrated into Eclipse Swing 
  19. 19. Combining Eclipse technologies with MPS  Dual licensing (Apache and EPL)  Building / continuous integration o Build language in MPS for building languages, running tests (ant scripts) o Executable and editor tests o Build artifacts are JARs  Interoperability between Eclipse tools and MPS o Through the generated artifacts (both directions) o Direct MPS code modification is not possible (abstraction gap)  On the end-user side o MPS  EMF exporter is available o importer is not implemented yet
  20. 20. Progress  Obtaining / using MPS-INCQUERY? ohttps://github.com/szabta89/MPS-IncQuery oGlobal library (modules pool) of MPS  Ongoing/Future work oSupport for graphical viewers in MPS oReleases • MPS-INCQUERY will be a fully featured and maintained port • Will be integrated into mbeddr releases (product build)
  21. 21. Conclusions to take home Sweet spots

Editor's Notes

  • Utolsó módosítás:
  • This was a challenge which was not really tackled earlier. There is not really a lot of such integration projects that we are aware of.
  • Xcore integration
  • ×