Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Normal form algorithms for extended context-free grammars

Published: 26 September 2001 Publication History

Abstract

We investigate the complexity of a variety of normal-form transformations for extended context-free grammars, where by extended we mean that the set of right-hand sides for each nonterminal in such a grammar is a regular set. The study is motivated by the implementation project GraMa which will provide a C++ toolkit for the symbolic manipulation of context-free objects just as Grail does for regular objects. Our results generalize known complexity bounds for context-free grammars but do so in nontrivial ways. Specifically, we introduce a new representation scheme for extended context-free grammars (the symbol-threaded expression forest), a new normal form for these grammars (dot normal form) and new regular expression algorithms. Copyright 2001 Elsevier Science B.V.

References

[1]
A.V. Aho, J.D. Ullman, The Theory of Parsing, Translation, and Compiling, Vol. I: Parsing, Prentice-Hall, Inc., Englewood Cliffs, NJ, 1972.
[2]
K.R. Barnes, Exploratory steps towards a grammatical manipulation package (GRAMPA), Master's Thesis, McMaster University, Hamilton, Ontario, Canada, 1972.
[3]
J.A. Brzozowski, Derivatives of regular expressions, J. ACM 11 (1964) 481-494.
[4]
H.A. Cameron, D. Wood, Structural equivalence of extended context-free and extended E0L grammars, 2000, to appear.
[5]
D.J. Cohen, C.C. Gotlieb, A list structure form of grammars for syntactic analysis, Comput. Surveys 2 (1970) 65-82.
[6]
D. Connolly, W3C web page on XML. http://www.w3.org/XML/, 1997.
[7]
A. Ehrenfeucht, G. Rozenberg, An easy proof of Greibach normal form, Inform. and Control 63 (1984) 190-199.
[8]
T.S. Freeman, G.M. Imirzian, E. Kaltofen, L. Yagati, Dagwood: A system for manipulating polynomials given by straight-line programs, ACM Trans. Math. Software 14 (1988) 218-240.
[9]
D. Giammarresi, D. Wood, Transition diagram systems and normal form transformations, Proceedings of the Sixth Italian Conference on Theoretical Computer Science, Singapore, 1998, World Scientific, Singapore.
[10]
S.A. Greibach, A new normal form theorem for context-free phrase structure grammars, J. ACM 12 (1965) 42-52.
[11]
S.A. Greibach, A simple proof of the standard-form theorem for context-free grammars, Technical report, Harvard University, Cambridge, MA, 1967.
[12]
M.A. Harrison, Introduction to Formal Language Theory, Addison-Wesley, Reading, MA, 1978.
[13]
M.A. Harrison, A. Yehudai, Eliminating null rules in linear time, Comput. J. 24 (1981) 156-161.
[14]
G. Hotz, Normal-form transformations of context-free grammars, Acta Cybernet. 4 (1978) 65-84.
[15]
H.B. Hunt III, D.J. Rosenkrantz, T.G. Szymanski, On the equivalence, containment and covering problems for the regular and context-free languages, J. Comput. System Sci. 12 (1976) 222-268.
[16]
ISO 8879: Information processing --- Text and once systems --- Standard Generalized Markup Language (SGML), International Organization for Standardization, October 1986.
[17]
P. Kilpelöinen, D. Wood, SGML and exceptions, in: C. Nicholas, D. Wood (Eds.), Proc. 3rd Int. Workshop on Principles of Document Processing (PODP 96), Lecture Notes in Computer Science, vol. 1293, Springer, Heidelberg, 1997, pp. 39-49.
[18]
R. Koch, N. Blum, Greibach normal form transformation revisited, in: Reischuk, Morvan (Eds.), STACS'97 Proc., Lecture Notes in Computer Science, vol. 1200, Springer, New York, 1997, pp. 47-54.
[19]
D.R. Raymond, D. Wood, Grail: a C++ library for automata and expressions, J. Symbolic Comput. 17 (1994) 341-350.
[20]
D.R. Raymond, D. Wood, Grail: engineering automata in C + +, version 2.5. Technical Report HKUST-CS96-24, Department of Computer Science, Hong Kong University of Science & Technology, Clear Water Bay, Kowloon, Hong Kong, 1996.
[21]
R.J. Ross, Grammar transformations based on regular decompositions of context-free derivations, Ph.D. Thesis, Department of Computer Science, Washington State University, Pullman, WA, USA, 1978.
[22]
R.J. Ross, G. Hotz, D.B. Benson, A general Greibach normal form transformation. Technical Report CS-78-048, Department of Computer Science, Washington State University, Pullman, WA, USA, 1978.
[23]
A. Salomaa, Formal Languages, Academic Press, New York, NY, 1973
[24]
D. Wood, Theory of Computation, Wiley, New York, NY, 1987.
[25]
D. Wood, Theory of Computation, 2nd Edition, Wiley, New York, NY, 2000, in preparation.
[26]
A. Yehudai, On the complexity of grammar and language problems, Ph.D. Thesis, University of California, Berkeley, CA, 1977.

Cited By

View all
  • (2019)Attribute grammars for unranked trees as a query language for structured documentsJournal of Computer and System Sciences10.1016/j.jcss.2004.10.00870:2(221-257)Online publication date: 1-Jan-2019
  • (2018)Schemas for Unordered XML on a DIMETheory of Computing Systems10.1007/s00224-014-9593-157:2(337-376)Online publication date: 26-Dec-2018
  • (2015)The (Almost) Complete Guide to Tree Pattern ContainmentProceedings of the 34th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems10.1145/2745754.2745766(117-130)Online publication date: 20-May-2015
  • Show More Cited By

Index Terms

  1. Normal form algorithms for extended context-free grammars

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image Theoretical Computer Science
    Theoretical Computer Science  Volume 267, Issue 1-2
    09/26/2001
    150 pages

    Publisher

    Elsevier Science Publishers Ltd.

    United Kingdom

    Publication History

    Published: 26 September 2001

    Author Tags

    1. complexity
    2. efficient algorithms
    3. extended context-free grammars
    4. grammatical representations
    5. normal forms
    6. symbolic manipulation

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 24 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2019)Attribute grammars for unranked trees as a query language for structured documentsJournal of Computer and System Sciences10.1016/j.jcss.2004.10.00870:2(221-257)Online publication date: 1-Jan-2019
    • (2018)Schemas for Unordered XML on a DIMETheory of Computing Systems10.1007/s00224-014-9593-157:2(337-376)Online publication date: 26-Dec-2018
    • (2015)The (Almost) Complete Guide to Tree Pattern ContainmentProceedings of the 34th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems10.1145/2745754.2745766(117-130)Online publication date: 20-May-2015
    • (2015)Proceedings of the 34th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database SystemsundefinedOnline publication date: 20-May-2015
    • (2014)Is the grass greener?Proceedings of the 5th international conference on Future energy systems10.1145/2602044.2602050(241-252)Online publication date: 11-Jun-2014
    • (2011)The complexity of text-preserving XML transformationsProceedings of the thirtieth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems10.1145/1989284.1989316(247-258)Online publication date: 13-Jun-2011
    • (2011)Generating, sampling and counting subclasses of regular tree languagesProceedings of the 14th International Conference on Database Theory10.1145/1938551.1938559(30-41)Online publication date: 21-Mar-2011
    • (2010)XML with incomplete informationJournal of the ACM10.1145/1870103.187010758:1(1-62)Online publication date: 21-Dec-2010
    • (2010)Simplifying XML schemaProceedings of the twenty-ninth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems10.1145/1807085.1807118(251-260)Online publication date: 6-Jun-2010
    • (2005)On the midpoint of a set of XML documentsProceedings of the 16th international conference on Database and Expert Systems Applications10.1007/11546924_43(441-450)Online publication date: 22-Aug-2005
    • Show More Cited By

    View Options

    View options

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media