Incremental Evaluation of Model Queries over EMF Models

  • Gábor Bergmann
  • Ákos Horváth
  • István Ráth
  • Dániel Varró
  • András Balogh
  • Zoltán Balogh
  • András Ökrös
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6394)


Model-driven development tools built on industry standard platforms, such as the EclipseModeling Framework (EMF), heavily utilize model queries in model transformation, well-formedness constraint validation and domain-specific model execution. As these queries are executed rather frequently in interactive modeling applications, they have a significant impact on runtime performance and end user experience. However, due to their complexity, these queries can be time consuming to implement and optimize on a case-by-case basis. Consequently, there is a need for a model query framework that combines an easy-to-use and concise declarative query formalism with high runtime performance.

In this paper, we propose a declarative EMF model query framework using the graph pattern formalism as the query specification language. These graph patterns describe the arrangement and properties of model elements that correspond to, e.g. a well-formedness constraint, or an application context of a model transformation rule.

For improved runtime performance, we employ incremental pattern matching techniques: matches of patterns are stored and incrementally maintained upon model manipulation. As a result, query operations can be executed instantly, independently of the complexity of the constraint and the size of the model. We demonstrate our approach in an industrial (AUTOSAR) model validation context and compare it against other solutions.


EMF model query incremental pattern matching model validation 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    The Eclipse Project: Eclipse Modeling Framework,
  2. 2.
  3. 3.
    The Eclipse Project: EMF Model Query,
  4. 4.
    Bergmann, G., Ökrös, A., Ráth, I., Varró, D., Varró, G.: Incremental pattern matching in the VIATRA model transformation system. In: Karsai, G., Taentzer, G. (eds.) Graph and Model Transformation (GraMoT 2008). ACM, New York (2008)Google Scholar
  5. 5.
    AUTOSAR Consortium: The AUTOSAR Standard,
  6. 6.
    Varró, D., Balogh, A.: The Model Transformation Language of the VIATRA2 Framework. Science of Computer Programming 68(3), 214–234 (2007)zbMATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Rensink, A.: Representing first-order logic using graphs. In: Ehrig, H., Engels, G., Parisi-Presicce, F., Rozenberg, G. (eds.) ICGT 2004. LNCS, vol. 3256, pp. 319–335. Springer, Heidelberg (2004)Google Scholar
  8. 8.
    Bergmann, G., Horváth, A., Ráth, I., Varró, D.: Efficient model transformations by combining pattern matching strategies. In: Paige, R.F. (ed.) ICMT 2009. LNCS, vol. 5563, pp. 20–34. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  9. 9.
    Baader, F., Calvanese, D., McGuinness, D.L., Nardi, D., Patel-Schneider, P.F. (eds.): The description logic handbook: theory, implementation, and applications. Cambridge University Press, New York (2003)zbMATHGoogle Scholar
  10. 10.
    The Eclipse Project: EMFT Search,
  11. 11.
    Biermann, E., Ermel, C., Taentzer, G.: Precise semantics of emf model transformations by graph transformation. In: Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) MODELS 2008. LNCS, vol. 5301, pp. 53–67. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  12. 12.
    Giese, H., Hildebrandt, S., Seibel, A.: Improved flexibility and scalability by interpreting story diagrams. In: Magaria, T., Padberg, J., Taentzer, G. (eds.) Proceedings of GT-VMT 2009. Electronic Communications of the EASST, vol. 18 (2009)Google Scholar
  13. 13.
    The Object Management Group: Object Constraint Language, v2.0 (May 2006),
  14. 14.
    Cabot, J., Teniente, E.: Incremental integrity checking of UML/OCL conceptual schemas. J. Syst. Softw. 82(9), 1459–1478 (2009)CrossRefGoogle Scholar
  15. 15.
    Groher, I., Reder, A., Egyed, A.: Incremental consistency checking of dynamic constraints. In: Rosenblum, D.S., Taentzer, G. (eds.) FASE 2009. LNCS, vol. 6013, pp. 203–217. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  16. 16.
    Hearnden, D., Lawley, M., Raymond, K.: Incremental model transformation for the evolution of model-driven systems. In: Nierstrasz, O., Whittle, J., Harel, D., Reggio, G. (eds.) MoDELS 2006. LNCS, vol. 4199, pp. 321–335. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  17. 17.
    Jouault, F., Tisi, M.: Towards incremental execution of ATL transformations. In: Tratt, L., Gogolla, M. (eds.) Theory and Practice of Model Transformations. LNCS, vol. 6142, pp. 123–137. Springer, Heidelberg (2010) (to appear)CrossRefGoogle Scholar
  18. 18.
    Mészáros, T., et al.: Manual and automated performance optimization of model transformation systems. Software Tools for Technology Transfer (2010) (to appear)Google Scholar
  19. 19.
    Giese, H., Wagner, R.: From model transformation to incremental bidirectional model synchronization. Software and Systems Modeling (SoSyM) 8(1) (March 2009)Google Scholar
  20. 20.
    Winkelmann, J., Taentzer, G., Ehrig, K., Küster, J.M.: Translation of restricted OCL constraints into graph constraints for generating meta model instances by graph grammars. Electron. Notes Theor. Comput. Sci. 211, 159–170 (2008)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Gábor Bergmann
    • 1
  • Ákos Horváth
    • 1
  • István Ráth
    • 1
  • Dániel Varró
    • 1
  • András Balogh
    • 2
  • Zoltán Balogh
    • 2
  • András Ökrös
    • 2
  1. 1.Department of Measurement and Information SystemsBudapest University of Technology and EconomicsBudapestHungary
  2. 2.OptxWare Research and Development LLC

Personalised recommendations