Graph Transformations

Volume 4178 of the series Lecture Notes in Computer Science pp 383-397

GrGen: A Fast SPO-Based Graph Rewriting Tool

  • Rubino GeißAffiliated withUniversität Karlsruhe (TH)
  • , Gernot Veit BatzAffiliated withUniversität Karlsruhe (TH)
  • , Daniel GrundAffiliated withUniversität Karlsruhe (TH)
  • , Sebastian HackAffiliated withUniversität Karlsruhe (TH)
  • , Adam SzalkowskiAffiliated withUniversität Karlsruhe (TH)

* Final gross prices may vary according to local VAT.

Get Access


Graph rewriting is a powerful technique that requires graph pattern matching, which is an NP-complete problem. We present GrGen, a generative programming system for graph rewriting, which applies heuristic optimizations. According to Varró’s benchmark it is at least one order of magnitude faster than any other tool known to us.

Our graph rewriting tool implements the well-founded single-pushout approach. We define the notion of search plans to represent different matching strategies and equip these search plans with a cost model, taking the present host graph into account. The task of selecting a good search plan is then viewed as an optimization problem.

For the ease of use, GrGen features an expressive specification language and generates program code with a convenient interface.