A Graph Query Language for EMF Models

  • Gábor Bergmann
  • Zoltán Ujhelyi
  • István Ráth
  • Dániel Varró
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6707)


While model queries are important components in model-driven tool chains, they are still frequently implemented using traditional programming languages, despite the availability of model query languages due to performance and expressiveness issues. In the current paper, we propose EMF-IncQuery as a novel, graph-based query language for EMF models by adapting the query language of the Viatra2 model transformation framework to inherit its concise, declarative nature, but to properly tailor the new query language to the modeling specificities of EMF. The EMF-IncQuery language includes (i) structural restrictions for queries imposed by EMF models, (ii) syntactic sugar and notational shorthand in queries, (iii) true semantic extensions which introduce new query features, and (iv) a constraint-based static type checking method to detect violations of EMF-specific type inference rules.


Model Transformation Query Language Transitive Closure Graph Transformation Graph Pattern 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    The Eclipse Project: Eclipse Modeling Framework,
  2. 2.
    Eclipse Model Development Tools Project: MDT-OCL website (2011),
  3. 3.
    Eclipse Modeling Project: EMF model query website (2011),
  4. 4.
    Bergmann, G., Horváth, Á., Ráth, I., Varró, D., Balogh, A., Balogh, Z., Ökrös, A.: Incremental evaluation of model queries over EMF models. In: Petriu, D.C., Rouquette, N., Haugen, Ø. (eds.) MODELS 2010. LNCS, vol. 6394, pp. 76–90. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  5. 5.
    Gilles, O., Hugues, J.: Validating requirements at model-level. In: Ingénierie Dirigée par les modéles (IDM 2008), Mulhouse, France, pp. 35–49 (2008)Google Scholar
  6. 6.
    Mouratidis, H., et al.: A natural extension of Tropos methodology for modelling security. In: Agent Oriented Methodologies Workshop. Object Oriented Programming, Systems, Languages (OOPSLA). ACM, Seattle-USA (2002)Google Scholar
  7. 7.
    Tun, T.T., et al.: Model-based argument analysis for evolving security requirements. Secure System Integration and Reliability Improvement 0, 88–97 (2010)Google Scholar
  8. 8.
    Varró, D., Pataricza, A.: VPM: A visual, precise and multilevel metamodeling framework for describing mathematical domains and UML. Journal of Software and Systems Modeling 2(3), 187–210 (2003)CrossRefGoogle Scholar
  9. 9.
    Varró, D., Balogh, A.: The model transformation language of the VIATRA2 framework. Sci. Comput. Program. 68(3), 214–234 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    de Lara, J., Guerra, E.: Deep meta-modelling with metaDepth. In: Vitek, J. (ed.) TOOLS 2010. LNCS, vol. 6141, pp. 1–20. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  11. 11.
    W3C OWL Working Group: OWL 2 Web Ontology Language. Technical report, W3C (2009),
  12. 12.
    Ujhelyi, Z.: Static type checking of model transformation programs. In: Ehrig, H., Rensink, A., Rozenberg, G., Schürr, A. (eds.) ICGT 2010. LNCS, vol. 6372, pp. 413–415. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  13. 13.
    Object Management Group: Object Constraint Language, Version 2.2. (February 2010)Google Scholar
  14. 14.
    Kolovos, D.S., Paige, R.F., Polack, F.A.C.: The epsilon transformation language. In: Vallecillo, A., Gray, J., Pierantonio, A. (eds.) ICMT 2008. LNCS, vol. 5063, pp. 46–60. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  15. 15.
    Eclipse Modeling Project: Xpand wiki (2010),
  16. 16.
    Biermann, E., et al.: Precise semantics of EMF model transformations by graph transformation. In: Busch, C., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) MODELS 2008. LNCS, vol. 5301, pp. 53–67. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  17. 17.
    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, vol. 18. Electronic Communications of the EASST (2009)Google Scholar
  18. 18.
    Arendt, T., et al.: Henshin: Advanced concepts and tools for in-place EMF model transformations. In: Petriu, D.C., Rouquette, N., Haugen, Ø. (eds.) MODELS 2010. LNCS, vol. 6394, pp. 121–135. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  19. 19.
    W3C: SPARQL Query Language for RDF (January 2008)Google Scholar
  20. 20.
    Cleenewerck, T., et al.: Evolution and reuse of language specifications for dSLs (ERLS). In: Østvold, B.M. (ed.) ECOOP 2004. LNCS, vol. 3344, pp. 187–201. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  21. 21.
    White, J., et al.: Improving domain-specific language reuse with software product line techniques. IEEE Software 26(4), 47–53 (2009)CrossRefGoogle Scholar
  22. 22.
    Ráth, I., et al.: Change-driven model transformations. In: Schürr, A., Selic, B. (eds.) MODELS 2009. LNCS, vol. 5795, pp. 342–356. Springer, Heidelberg (2009)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Gábor Bergmann
    • 1
  • Zoltán Ujhelyi
    • 1
  • István Ráth
    • 1
  • Dániel Varró
    • 1
  1. 1.Department of Measurement and Information SystemsBudapest University of Technology and EconomicsBudapest

Personalised recommendations