A Graph Query Language for EMF models

Gábor Bergmann, Zoltán Ujhelyi, István Ráth, Dániel Varró. A Graph Query Language for EMF models. In Jordi Cabot, Eelco Visser, editors, Theory and Practice of Model Transformations, Fourth International Conference, ICMT 2011, Zurich, Switzerland, June 27-28, 2011. Proceedings. Volume 6707 of Lecture Notes in Computer Science, pages 167-182, Springer, 2011.


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.