Acta Informatica

, Volume 52, Issue 6, pp 497–524 | Cite as

Contextual hyperedge replacement

Original Article

Abstract

Contextual hyperedge-replacement grammars (contextual grammars, for short) are an extension of hyperedge replacement grammars. They have recently been proposed as a grammatical method for capturing the structure of object-oriented programs, thus serving as an alternative to the use of meta-models like uml class diagrams in model-driven software design. In this paper, we study the properties of contextual grammars. Even though these grammars are not context-free, one can show that they inherit several of the nice properties of hyperedge replacement grammars. In particular, they possess useful normal forms and their membership problem is in NP.

Keywords

Graph grammar Hyperedge replacement Context Contextual grammar 

Mathematics Subject Classification

F.4.3 [formal languages] Classes defined by grammars—contextual graph grammars 

Notes

Acknowledgments

We wish to thank several people: Annegret Habel for numerous useful comments on the contents of previous versions of this paper, Mark Minas for extensive discussions on many aspects of this work, in particular for his promise to re-join us when parsing of contextual grammars shall be considered at depth, and the two anonymous referees who read the manuscript carefully and provided various useful comments.

References

  1. 1.
    Abadi, M., Cardelli, L.: A Theory of Objects. Monographs in Computer Science. Springer, New York (1996)Google Scholar
  2. 2.
    Bakewell, A., Plump, D., Runciman, C.: Specifying pointer structures by graph reduction. In: Nagl, M., Pfaltz, J., Böhlen, B. (eds.) Applications of Graph Transformation with Industrial Relevance (AGTIVE’03), No. 3062 in Lecture Notes in Computer Science, pp. 30–44. Springer, Berlin (2004)Google Scholar
  3. 3.
    Blomer, J., Geiß, R.: GrGen.net: A generative system for graph-rewriting, user manual. www.grgen.net (2006–2011)
  4. 4.
    Courcelle, B., Engelfriet, J.: Graph Structure and Monadic Second-Order Logic—A Language-Theoretic Approach, Encyclopedia of Mathematics and Its Applications, vol. 138. Cambridge University Press, Cambridge (2012)CrossRefGoogle Scholar
  5. 5.
    Drewes, F., Habel, A., Kreowski, H.J.: Hyperedge replacement graph grammars. In: Rozenberg, G. (ed.) Handbook of Graph Grammars and Computing by Graph Transformation Vol. I: Foundations, chap. 2, pp. 95–162. World Scientific, Singapore (1997)CrossRefGoogle Scholar
  6. 6.
    Drewes, F., Hoffmann, B., Janssens, D., Minas, M.: Adaptive star grammars and their languages. Theor. Comput. Sci. 411, 3090–3109 (2010)MATHMathSciNetCrossRefGoogle Scholar
  7. 7.
    Drewes, F., Hoffmann, B., Janssens, D., Minas, M., Van Eetvelde, N.: Adaptive star grammars. In: Corradini, A., Ehrig, H., Montanari, U., Ribeiro, L., Rozenberg, G. (eds.) 3rd International Conference on Graph Transformation (ICGT’06), No. 4178 in Lecture Notes in Computer Science, pp. 77–91. Springer, Berlin (2006)Google Scholar
  8. 8.
    Drewes, F., Hoffmann, B., Janssens, D., Minas, M., Van Eetvelde, N.: Shaped generic graph transformation. In: Schürr, A., Nagl, M., Zündorf, A. (eds.) Applications of Graph Transformation with Industrial Relevance (AGTIVE’07), No. 5088 in Lecture Notes in Computer Science, pp. 201–216. Springer, Berlin (2008)Google Scholar
  9. 9.
    Drewes, F., Hoffmann, B., Minas, M.: Context-exploiting shapes for diagram transformation. Mach. Graph. Vis. 12(1), 117–132 (2003)Google Scholar
  10. 10.
    Drewes, F., Hoffmann, B., Minas, M.: Adaptive star grammars for graph models. In: Ehrig, H., Heckel, R., Rozenberg, G., Taentzer, G. (eds.) 4th International Conference on Graph Transformation (ICGT’08), No. 5214 in Lecture Notes in Computer Science, pp. 201–216. Springer, Berlin (2008)Google Scholar
  11. 11.
    Drewes, F., Hoffmann, B., Minas, M.: Contextual hyperedge replacement. In: Schürr, A., Varró, D., Varró, G. (eds.) Proceedings of Applications of Graph Transformation with Industrial Relevance 2011 (AGTIVE 2011), No. 7233 in Lecture Notes in Computer Science, pp. 182–197. Springer, Berlin (2012)Google Scholar
  12. 12.
    Ehrig, H., Ehrig, K., Prange, U., Taentzer, G.: Fundamentals of Algebraic Graph Transformation. Springer, EATCS Monographs on Theoretical Computer Science (2006)Google Scholar
  13. 13.
    Engelfriet, J.: Context-free graph grammars. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, vol. 3: Beyond Words, chap. 3, pp. 125–213. Springer, Berlin (1999)Google Scholar
  14. 14.
    Habel, A.: Hyperedge Replacement: Grammars and Languages. No. 643 in Lecture Notes in Computer Science. Springer, Berlin (1992)Google Scholar
  15. 15.
    Habel, A., Radke, H.: Expressiveness of graph conditions with variables. In: Electronic Communications of the EASST 30 (2010). International Colloquium on Graph and Model Transformation (GraMoT’10)Google Scholar
  16. 16.
    Harary, F.: Graph Theory. Addison-Wesley, Reading, MA (1969)Google Scholar
  17. 17.
    Hoffmann, B.: Shapely hierarchical graph transformation. In: Proceedings of IEEE Symposia on Human-Centric Computing Languages and Environments, pp. 30–37. IEEE Computer Press, Silver Spring, MD (2001)Google Scholar
  18. 18.
    Hoffmann, B.: Conditional adaptive star grammars. Electronic Communications of the EASST 26 (2010)Google Scholar
  19. 19.
    Hoffmann, B.: More on graph rewriting with contextual refinement. In: A. Habel, M. Mosbah, R. Echahed (eds.) Fifth International Workshop on Graph Computational Models (GCM 2014) (2014). Downloadable at http://gcm2014.imag.fr/proceedingsGCM2014.pdf
  20. 20.
    Hoffmann, B., Minas, M.: Defining models—meta models versus graph grammars. Elect. Comm. of the EASST 29 (2010). In Proceedings of 6th Workshop on Graph Transformation and Visual Modeling Techniques (GT-VMT’10), Paphos, CyprusGoogle Scholar
  21. 21.
    Lange, K.J., Welzl, E.: String grammars with disconnecting or a basic root of the difficulty in graph grammar parsing. Discrete Appl. Math. 16, 17–30 (1987)MATHMathSciNetCrossRefGoogle Scholar
  22. 22.
    Minas, M.: Concepts and realization of a diagram editor generator based on hypergraph transformation. Sci. Comput. Program. 44(2), 157–180 (2002)MATHCrossRefGoogle Scholar
  23. 23.
    Parikh, R.J.: On context-free languages. J. ACM 13, 570–581 (1966)MATHMathSciNetCrossRefGoogle Scholar
  24. 24.
    Rumbaugh, J., Jacobson, I., Booch, G.: The Unified Modeling Language Reference Manual. Object Technology Series, 2nd edn. Addison Wesley, Reading, MA (2004)Google Scholar
  25. 25.
    Sagiv, M., Reps, T., Wilhelm, R.: Solving shape-analysis problems in languages with destructive updating. ACM Trans. Program. Lang. Syst. 20(1), 1–50 (1998)CrossRefGoogle Scholar
  26. 26.
    Van Eetvelde, N.: A graph transformation approach to refactoring. Doctoral thesis, Universiteit Antwerpen (2007)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  1. 1.Institutionen för datavetenskapUmeå universitetUmeåSweden
  2. 2.FB 3 – InformatikUniversität BremenBremenGermany

Personalised recommendations