Incremental Pattern Matching for the Efficient Computation of Transitive Closure

  • Gábor Bergmann
  • István Ráth
  • Tamás Szabó
  • Paolo Torrini
  • Dániel Varró
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7562)


Pattern matching plays a central role in graph transformations as a key technology for computing local contexts in which transformation rules are to be applied. Incremental matching techniques offer a performance advantage over the search-based approach, in a number of scenarios including on-the-fly model synchronization, model simulation, view maintenance, well-formedness checking and state space traversal [1,2]. However, the incremental computation of transitive closure in graph pattern matching has started to be investigated only recently [3]. In this paper, we propose multiple algorithms for the efficient computation of generalized transitive closures. As such, our solutions are capable of computing reachability regions defined by simple graph edges as well as complex binary relationships defined by graph patterns, that may be used in a wide spectrum of modeling problems. We also report on experimental evaluation of our prototypical implementation, carried out within the context of a stochastic system simulation case study.


Pattern Match Transitive Closure Graph Transformation Graph Pattern Strongly Connect Component 
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.
    Bergmann, G., Horváth, Á., Ráth, I., Varró, D.: A Benchmark Evaluation of Incremental Pattern Matching in Graph Transformation. In: Ehrig, H., Heckel, R., Rozenberg, G., Taentzer, G. (eds.) ICGT 2008. LNCS, vol. 5214, pp. 396–410. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  2. 2.
    Ghamarian, A.H., Jalali, A., Rensink, A.: Incremental pattern matching in graph-based state space exploration. Electronic Communications of the EASST (2010), GraBaTs 2010, EnschedeGoogle Scholar
  3. 3.
    Jalali, A., Ghamarian, A.H., Rensink, A.: Incremental pattern matching for regular expressions. In: 11th International Workshop on Graph Transformation and Visual Modeling Techniques (GT-VMT 2012) (2012)Google Scholar
  4. 4.
    Anquetil, N., Kulesza, U., Mitschke, R., Moreira, A., Royer, J.C., Rummler, A., Sousa, A.: A model-driven traceability framework for software product lines. Software and Systems Modeling 9, 427–451 (2010), doi:10.1007/s10270-009-0120-9CrossRefGoogle Scholar
  5. 5.
    Kovács, M., Gönczy, L., Varró, D.: Formal analysis of bpel workflows with compensation by model checking. International Journal of Computer Systems and Engineering 23(5) (2008)Google Scholar
  6. 6.
    Varró, D., Balogh, A.: The model transformation language of the VIATRA2 framework. Sci. Comput. Program. 68(3), 214–234 (2007)zbMATHCrossRefGoogle Scholar
  7. 7.
    Madari, I., Lengyel, L., Mezei, G.: Incremental model synchronization by bi-directional model transformations. In: IEEE International Conference on Computational Cybernetics, ICCC 2008, pp. 215–218. IEEE (2008)Google Scholar
  8. 8.
    Torrini, P., Heckel, R., Ráth, I., Bergmann, G.: Stochastic graph transformation with regions. ECEASST 29 (2010)Google Scholar
  9. 9.
    Horváth, Á., Bergmann, G., Ráth, I., Varró, D.: Experimental assessment of combining pattern matching strategies with VIATRA2. International Journal on Software Tools for Technology Transfer (STTT) 12, 211–230 (2010), doi:10.1007/s10009-010-0149-7CrossRefGoogle Scholar
  10. 10.
    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, Part I. LNCS, vol. 6394, pp. 76–90. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  11. 11.
    Proctor, M., et al.: Drools Documentation. JBoss,
  12. 12.
    La Poutré, J.A., van Leeuwen, J.: Maintenance of Transitive Closures and Transitive Reductions of Graphs. In: Göttler, H., Schneider, H.-J. (eds.) WG 1987. LNCS, vol. 314, pp. 106–120. Springer, Heidelberg (1988)CrossRefGoogle Scholar
  13. 13.
    Frigioni, D., Miller, T., Nanni, U., Zaroliagis, C.: An experimental study of dynamic algorithms for transitive closure. ACM Journal of Experimental Algorithmics 6, 2001 (2000)MathSciNetGoogle Scholar
  14. 14.
    Torrini, P., Heckel, R., Ráth, I.: Stochastic Simulation of Graph Transformation Systems. In: Rosenblum, D.S., Taentzer, G. (eds.) FASE 2010. LNCS, vol. 6013, pp. 154–157. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  15. 15.
    Ehrig, H., Ehrig, K., Prange, U., Taentzer, G.: Fundamentals of algebraic graph transformation. Springer (2006)Google Scholar
  16. 16.
    Khan, A., Heckel, R., Torrini, P., Ráth, I.: Model-Based Stochastic Simulation of P2P VoIP Using Graph Transformation System. In: Al-Begain, K., Fiems, D., Knottenbelt, W.J. (eds.) ASMTA 2010. LNCS, vol. 6148, pp. 204–217. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  17. 17.
    Varró, G., Varró, D.: Graph transformation with incremental updates. In: Proc. GT-VMT 2004, International Workshop on Graph Transformation and Visual Modelling Techniques. ENTCS, vol. 109, pp. 71–83. Elsevier (2004)Google Scholar
  18. 18.
    Varró, G., Varró, D., Schürr, A.: Incremental Graph Pattern Matching: Data Structures and Initial Experiments. In: Graph and Model Transformation (GraMoT 2006). Electronic Communications of the EASST, vol. 4. EASST (2006)Google Scholar
  19. 19.
    Hearnden, D., Lawley, M., Raymond, K.: Incremental Model Transformation for the Evolution of Model-Driven Systems. In: Wang, J., Whittle, J., Harel, D., Reggio, G. (eds.) MoDELS 2006. LNCS, vol. 4199, pp. 321–335. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  20. 20.
    Forgy, C.L.: Rete: A fast algorithm for the many pattern/many object pattern match problem. Artificial Intelligence 19(1), 17–37 (1982)CrossRefGoogle Scholar
  21. 21.
    Torrini, P., Ráth, I.: GraTS: graph transformation-based stochastic simulation — Documentation (2012),
  22. 22.
    Khan, A., Torrini, P., Heckel, R.: Model-based simulation of VoIP network reconfigurations using graph transformation systems. In: Corradini, A., Tuosto, E. (eds.) Intl. Conf. on Graph Transformation (ICGT) 2008 - Doctoral Symposium. Electronic Communications of the EASST, vol. 16 (2009),
  23. 23.
    Kosiuczenko, P., Lajios, G.: Simulation of generalised semi-Markov processes based on graph transformation systems. Electronic Notes in Theoretical Computer Science 175, 73–86 (2007)CrossRefGoogle Scholar
  24. 24.
    Cassandras, C.G., Lafortune, S.: Introduction to discrete event systems. Kluwer (2008)Google Scholar
  25. 25.
    D’Argenio, P.R., Katoen, J.P.: A theory of stochastic systems part I: Stochastic automata. Inf. Comput. 203(1), 1–38 (2005)MathSciNetzbMATHCrossRefGoogle Scholar
  26. 26.
    Gupta, A., Mumick, I.S., Subrahmanian, V.S.: Maintaining views incrementally (extended abstract). In: Proc. of the Int. Conf. on Management of Data, pp. 157–166. ACM (1993)Google Scholar
  27. 27.
    Tarjan, R.: Depth-first search and linear graph algorithms. SIAM Journal on Computing 1(2), 146–160 (1972)MathSciNetzbMATHCrossRefGoogle Scholar
  28. 28.
    Demetrescu, C., Italiano, G.F.: Dynamic shortest paths and transitive closure: algorithmic techniques and data structures. J. Discr. Algor. 4, 353–383 (2006)MathSciNetzbMATHCrossRefGoogle Scholar
  29. 29.
    Schürr, A.: Introduction to PROGRES, an Attributed Graph Grammar Based Specification Language. In: Nagl, M. (ed.) WG 1989. LNCS, vol. 411, pp. 151–165. Springer, Heidelberg (1990)CrossRefGoogle Scholar
  30. 30.
    Nickel, U., Niere, J., Zündorf, A.: Tool demonstration: The FUJABA environment. In: The 22nd International Conference on Software Engineering (ICSE), Limerick, Ireland. ACM Press (2000)Google Scholar
  31. 31.
    Jouault, F., Tisi, M.: Towards Incremental Execution of ATL Transformations. In: Tratt, L., Gogolla, M. (eds.) ICMT 2010. LNCS, vol. 6142, pp. 123–137. Springer, Heidelberg (2010)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Gábor Bergmann
    • 1
  • István Ráth
    • 1
  • Tamás Szabó
    • 1
  • Paolo Torrini
    • 1
  • Dániel Varró
    • 1
  1. 1.Department of Measurement and Information SystemsBudapest University of Technology and EconomicsBudapestHungary

Personalised recommendations