Graph Pattern Matching as an Embedded Clojure DSL

  • Tassilo HornEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9151)


FunnyQT is a Clojure library supplying a comprehensive set of model querying and transformation services to the user. These are provided as APIs and embedded DSLs. This paper introduces FunnyQT’s embedded graph pattern matching DSL which allows users to define patterns using a convenient textual notation that can be applied to graphs. The result of applying a pattern to a graph is the lazy sequence of all matches of the pattern in the graph. FunnyQT’s pattern matching DSL is quite expressive. It supports positive and negative application conditions, arbitrary constraints, patterns with alternatives, nested patterns, and more. In case a pattern is defined to be evaluated eagerly instead of lazily, the search induced by the pattern is automatically parallelized on multi-core machines for improved performance.


Model Transformation Pattern Match Graph Transformation Transformation Language Nest 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.


  1. 1.
    Arendt, T., Biermann, E., Jurack, S., Krause, C., Taentzer, G.: Henshin: advanced concepts and tools for in-place EMF model transformations. In: Petriu, D.C., Rouquette, N., Haugen, Ø. (eds.) MODELS 2010, Part I. LNCS, vol. 6394, pp. 121–135. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  2. 2.
    Cuadrado, J.S., Molina, J.G., Tortosa, M.M.: RubyTL: a practical, extensible transformation language. In: Rensink, A., Warmer, J. (eds.) ECMDA-FA 2006. LNCS, vol. 4066, pp. 158–172. Springer, Heidelberg (2006) CrossRefGoogle Scholar
  3. 3.
    Eickhoff, C., George, T., Lindel, S., Zündorf, A.: The SDMLib solution to the MovieDB case for TTC2014. In: Rose, L.M., Krause, C., Horn, T. (eds.) Proceedings of the 7th Transformation Tool Contest part of the Software Technologies: Applications and Foundations (STAF 2014). CEUR Workshop Proceedings, vol. 1305. (2014)Google Scholar
  4. 4.
    Fowler, M.: Domain Specific Languages, 1st edn. Addison-Wesley Professional, Boston (2010)Google Scholar
  5. 5.
    George, L., Wider, A., Scheidgen, M.: Type-safe model transformation languages as internal DSLs in scala. In: Hu, Z., de Lara, J. (eds.) ICMT 2012. LNCS, vol. 7307, pp. 160–175. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  6. 6.
    Ghamarian, A.H., de Mol, M., Rensink, A., Zambon, E., Zimakova, M.: Modelling and analysis using GROOVE. STTT 14(1), 15–40 (2012)CrossRefGoogle Scholar
  7. 7.
    Hinkel, G., Happe, L.: Using component frameworks for model transformations by an internal DSL. In: Ciccozzi, F., Tivoli, M., Carlson, J. (eds.) Proceedings of the 1st International Workshop on Model-Driven Engineering for Component-Based Software Systems co-located with MODELS 2014. CEUR Workshop Proceedings, vol. 1281, pp. 6–15. (2014)Google Scholar
  8. 8.
    Horn, T.: Model querying with FunnyQT (extended abstract). In: Duddy, K., Kappel, G. (eds.) ICMB 2013. LNCS, vol. 7909, pp. 56–57. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  9. 9.
    Jakumeit, E., Buchwald, S., Kroll, M.: GrGen.NET - The expressive, convenient and fast graph rewrite system. STTT 12(3–4), 263–271 (2010)CrossRefGoogle Scholar
  10. 10.
    Jouault, F., Bézivin, J.: KM3: a DSL for metamodel specification. In: Gorrieri, R., Wehrheim, H. (eds.) FMOODS 2006. LNCS, vol. 4037, pp. 171–185. Springer, Heidelberg (2006) CrossRefGoogle Scholar
  11. 11.
    Jouault, F., Kurtev, I.: Transforming models with ATL. In: Bruel, J.-M. (ed.) MoDELS 2005. LNCS, vol. 3844, pp. 128–138. Springer, Heidelberg (2006) CrossRefGoogle Scholar
  12. 12.
    Kolovos, D., Rose, L., Paige, R.: The Epsilon Book, March 2013Google Scholar
  13. 13.
    Křikava, F., Collet, P., France, R.B.: SIGMA: scala internal domain-specific languages for model manipulations. In: Dingel, J., Schulte, W., Ramos, I., Abrahão, S., Insfran, E. (eds.) MODELS 2014. LNCS, vol. 8767, pp. 569–585. Springer, Heidelberg (2014) Google Scholar
  14. 14.
    Object Management Group: Meta Object Facility (MOF) 2.0 Query/View/Transformation Specification, Version 1.1, January 2011Google Scholar
  15. 15.
    Object Management Group: Object Constraint Language - version 2.4, February 2014Google Scholar
  16. 16.
    Runge, O., Ermel, C., Taentzer, G.: AGG 2.0 – new features for specifying and analyzing algebraic graph transformations. In: Schürr, A., Varró, D., Varró, G. (eds.) AGTIVE 2011. LNCS, vol. 7233, pp. 81–88. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  17. 17.
    Steinberg, D., Budinsky, F., Paternostro, M., Merks, E.: EMF: Eclipse Modeling Framework, 2 edn. Addison-Wesley Professional, Reading (2008)Google Scholar
  18. 18.
    Ujhelyi, Z., Bergmann, G., Hegedüs, Á., Horváth, Á., Izsó, B., Ráth, I., Szatmári, Z., Varró, D.: Emf-incquery: an integrated development environment for live model queries. Sci. Comput. Program. 98, 80–99 (2015)CrossRefGoogle Scholar
  19. 19.
    Varró, D., Balogh, A.: The model transformation language of the VIATRA2 framework. Sci. Comput. Program. 68(3), 214–234 (2007)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.Institute for Software TechnologyUniversity of Koblenz-LandauMainzGermany

Personalised recommendations