Skip to main content

Practical applications of precedence graph grammars

  • Part II Technical Contributions
  • Conference paper
  • First Online:
Graph-Grammars and Their Application to Computer Science (Graph Grammars 1986)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 291))

Abstract

Precedence graph grammars are of major interest in all those applications of graph grammars, where highly efficient parsers are needed. Up to now there are no other graph parsers with the same performance. Due to the fact, that even regular graph grammars with very restricted embedding relations have a NP-complete membership problem, different kinds than Chomsky-like restrictions have to be imposed on graph grammars. We start with contextfree graph grammars and introduce precedence relations. By demanding conflictfreeness, unique invertibility and some further, more technical constraints, precedence graph grammars are introduced with an O(n2) — membership problem, where n ist the number of nodes of the input graph.Precedence graph grammars are unambiguous, which is especially important for semantic evaluation of the derivation trees. In this paper we show, that in spite of all constraints the proposed graph grammar class has interesting generative power, concerning applications in such areas as e.g. dynamic data structures, program graphs, data and control flow graphs and syntactic pattern recognition. For the last topic an error correcting facility incorporated into the precedence graph parser is of special interest. In general inexact graph matching is NP-complete. In this paper we present a method, that increases the time complexity of our parser only by a factor of n. At last, our method is demonstrated with an example from syntactic pattern recognition.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

10. References

  1. Aalbersberg, I.J./G. Rozenberg/A. Ehrenfeucht: On the membership problem for regular DNLC grammars; Discr. Appl. Math. 13, (1986) 79–85

    Article  Google Scholar 

  2. A.V. Aho/J.D. Ullman: The Theory of Parsing, Translation, and Compiling; I,II, Prentice-Hall, Englewood Cliffs, NJ (1972)

    Google Scholar 

  3. J.P. Babinov: Class of generalized context-sensitive prcedence languages; Progr.Comput. Software 5 (1979) 117–126

    Google Scholar 

  4. H. Bunke/G. Allermann: Inexact Graph Matching for Structural Pattern Recognition; Pat.Rec.Let. 1 (1983) 245–253

    Article  Google Scholar 

  5. V. Claus/H. Ehrig/G. Rozenberg: Graph-Grammars and Their Application to Computer Science and Biology; 1st Int. Workshop, LNCS 73, Springer (1979)

    Google Scholar 

  6. H. Ehrig/M. Nagl/G. Rozenberg(Eds.): Graph-Grammars and Their Application to Computer Science, 2nd Int. Workshop, LNCS 153, Springer (1983)

    Google Scholar 

  7. R. Franck: A Class of Linearly Parsable Graph Grammars, Acta Inform. 10(1978)175–201

    Article  Google Scholar 

  8. K.S. Fu: Syntactic Pattern Recognition; Prentice-Hall, Englewood Cliffs, NJ (1982)

    Google Scholar 

  9. M.R. Garey/D.S. Johnson: Computers and Intractability; A Guide to the Theory of NP-Completeness; Freeman, San Francisco(1979)

    Google Scholar 

  10. F. Harary: Graph Theory; Addison-Wesley Publ. Comp., Reading Mass. (1969)

    Google Scholar 

  11. M. Harrison: Introduction to Formal Language Theory; Addison-Wesley Publ. Comp., Reading Mass. (1978)

    Google Scholar 

  12. R. Haskell: Symmetrical precedence relations on general phrase structure grammars; Comp. Journ. 17 (1974) 234–241

    Article  Google Scholar 

  13. D. Janssens/G. Rozenberg: On the structure of Node Label Controlled Graph Languages; Inform.Sci. 20 (1980) 191–216

    Google Scholar 

  14. M.Kaul: Syntaxanalyse von Graphen bei Präzedenz-Graph-Grammatiken; Techn. Report MIP-8610, Uni. Passau, West-Germany

    Google Scholar 

  15. D.E.Knuth: Semantic of Context-free Languages; Math. Syst. Theo. (1968)

    Google Scholar 

  16. C.Lewerentz/M.Nagl: A Formal Specification Language for Software Systems Defined by Graph Grammars; in U.Pape (Ed.):Proc. WG'84, Workshop on Graphtheor. Conc. in Computer Science, June 13–15, Berlin (1984)

    Google Scholar 

  17. H. Ludwigs: Properties of Ordered Graph Grammars; in: H.Noltemeier(Ed.): Graphtheoretic Concepts in Comp. Science; LNCS 100, Springer (1981) 70–79

    Google Scholar 

  18. M. Nagl: Graph-Grammatiken — Theorie, Implementierung, Anwendung; Vieweg, Braunschweig (1979)

    Google Scholar 

  19. M.Nagao: Control Strategies in Pattern Analysis; Proc. Pat. Rec. Vol. I, 6th Int. Conf., Munich 1982 (1982) 996–1006

    Google Scholar 

  20. A.Rosenfeld: Image Analysis: Progress, Problems, and Prospects; Proc. Pat. Rec. Vol. I, 6th Int. Conf., Munich 1982 (1982) 7–15

    Google Scholar 

  21. A. Schütte: Spezifikation und Generierung von Übersetzern für Graph-Sprachen durch attributierte Graph-Grammatiken; Dissertation, Express Edition (Reihe Informatik), Berlin 1987.

    Google Scholar 

  22. L.G.Shapiro/R.M.Haralick: Structural Descriptions and Inexact Matching;IEEE Trans. Pat. Ana. PAMI-3, No. 5 (1981)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Hartmut Ehrig Manfred Nagl Grzegorz Rozenberg Azriel Rosenfeld

Rights and permissions

Reprints and permissions

Copyright information

© 1987 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kaul, M. (1987). Practical applications of precedence graph grammars. In: Ehrig, H., Nagl, M., Rozenberg, G., Rosenfeld, A. (eds) Graph-Grammars and Their Application to Computer Science. Graph Grammars 1986. Lecture Notes in Computer Science, vol 291. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-18771-5_62

Download citation

  • DOI: https://doi.org/10.1007/3-540-18771-5_62

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-18771-4

  • Online ISBN: 978-3-540-48178-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics