Fast, Faster and Super-fast Model Queries

Session Type: 
Standard Talk [25 minutes]

In this talk we describe three recent innovations that deliver major performance boosts to modeling tools that rely on model queries at run-time.

  • The Eclipse OCL code generator totally eliminates the need for any OCL parsing at run-time. Direct Java code is generated when a model is genmodelled. This may easily yield thousand-fold improvements for the first execution of a simple query.
  • The associated Eclipse OCL run-time exploits a polymorphic library and the dispatch tables provided by the code generator to totally eliminate the interpretation overheads. This may yield between 5 and 50-fold improvements in execution speed.
  • The graph pattern-based query language of the novel EMF-IncQuery framework supports the optimisation of queries for re-evaluation. This may improve speed by many orders of magnitude for large models, enabling execution to far outperform manual Java code.

EMF provides the foundation for modeling and directly supports model queries that are hand-coded in Java. We will review this foundation and then review more model-oriented languages for queries such as XPath or OCL and projects such as EMF-IncQuery and EMF Query 2. We will examine the strategies used to represent a query and to provide a response and see how these can be accelerated and optimised for re-evaluation. We then introduce the new code generator and analysis innovations in the MDT/OCL project, before considering the more structured pattern query language and the Rete algorithm used by the EMF-IncQuery project. We will conclude by showing how the code generator innovations lay the foundations for a transformation virtual machine and how the pattern language naturally leads on to support for QVT and other languages.

Schedule info

Theater Stage


Eclipse Technology
Experience level: 

Copyright © 2012 The Eclipse Foundation. All Rights Reserved.