Conservative Ambiguity Detection in Context-Free Grammars

  • Sylvain Schmitz
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4596)

Abstract

The ability to detect ambiguities in context-free grammars is vital for their use in several fields, but the problem is undecidable in the general case. We present a safe, conservative approach, where the approximations cannot result in overlooked ambiguous cases . We analyze the complexity of the verification, and provide formal comparisons with several other ambiguity detection methods.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Cheung, B.S.N., Uzgalis, R.C.: Ambiguity in context-free grammars. In: SAC 1995, pp. 272–276. ACM Press, New York (1995), doi:10.1145/315891.315991CrossRefGoogle Scholar
  2. 2.
    Reeder, J., Steffen, P., Giegerich, R.: Effective ambiguity checking in biosequence analysis. BMC Bioinformatics 6, 153 (2005)CrossRefGoogle Scholar
  3. 3.
    Brabrand, C., Giegerich, R., Møller, A.: Analyzing ambiguity of context-free grammars. Technical Report RS-06-09, BRICS, University of Aarhus (May 2006)Google Scholar
  4. 4.
    AeroSpace and Defence Industries Association of Europe: ASD Simplified Technical English, Specification ASD-STE100 (2005)Google Scholar
  5. 5.
    Kuich, W.: Systems of pushdown acceptors and context-free grammars. Elektronische Informationsverarbeitung und Kybernetik 6(2), 95–114 (1970)MATHMathSciNetGoogle Scholar
  6. 6.
    Schröer, F.W.: AMBER, an ambiguity checker for context-free grammars. Technical report, compilertools.net (2001)Google Scholar
  7. 7.
    Schmitz, S.: An experimental ambiguity detection tool. In: Sloane, A., Johnstone, A., eds.: LDTA 2007, To appear in Electronic Notes in Theoretical Computer Science (2007)Google Scholar
  8. 8.
    Cantor, D.G.: On the ambiguity problem of Backus systems. Journal of the ACM 9(4), 477–479 (1962)MATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Chomsky, N., Schützenberger, M.P.: The algebraic theory of context-free languages. In: Braffort, P., Hirshberg, D. (eds.) Computer Programming and Formal Systems. Studies in Logic, pp. 118–161. North-Holland Publishing, Amsterdam (1963)Google Scholar
  10. 10.
    Gorn, S.: Detection of generative ambiguities in context-free mechanical languages. Journal of the ACM 10(2), 196–208 (1963)MATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    Jampana, S.: Exploring the problem of ambiguity in context-free grammars. Master’s thesis, Oklahoma State University (July 2005)Google Scholar
  12. 12.
    Culik, K., Cohen, R.: LR-Regular grammars—an extension of LR(k) grammars. Journal of Computer and System Sciences 7, 66–96 (1973)MATHMathSciNetGoogle Scholar
  13. 13.
    Schmitz, S.: Conservative ambiguity detection in context-free grammars. Technical Report I3S/RR-2006-30-FR, Laboratoire I3S, Université de Nice - Sophia Antipolis & CNRS (September 2006)Google Scholar
  14. 14.
    Ginsburg, S., Harrison, M.A.: Bracketed context-free languages. Journal of Computer and System Sciences 1, 1–23 (1967)MATHMathSciNetGoogle Scholar
  15. 15.
    Nederhof, M.J.: Regular approximation of CFLs: a grammatical view. In: Bunt, H., Nijholt, A. (eds.) Advances in Probabilistic and other Parsing Technologies, pp. 221–241. Kluwer Academic Publishers, Boston, MA (2000)Google Scholar
  16. 16.
    Knuth, D.E.: On the translation of languages from left to right. Information and Control 8(6), 607–639 (1965)CrossRefMathSciNetGoogle Scholar
  17. 17.
    Sikkel, K. (ed.): Parsing Schemata - a framework for specification and analysis of parsing algorithms. Texts in Theoretical Computer Science - An EATCS Series. Springer, Heidelberg (1997)Google Scholar
  18. 18.
    Hunt III, H.B., Szymanski, T.G., Ullman, J.D.: Operations on sparse relations and efficient algorithms for grammar problems. In: 15th Annual Symposium on Switching and Automata Theory, pp. 127–132. IEEE Computer Society, Los Alamitos (1974)CrossRefGoogle Scholar
  19. 19.
    Hunt III, H.B., Szymanski, T.G., Ullman, J.D.: On the complexity of LR(k) testing. Communications of the ACM 18(12), 707–716 (1975)MATHCrossRefMathSciNetGoogle Scholar
  20. 20.
    Szymanski, T.G., Williams, J.H.: Noncanonical extensions of bottom-up parsing techniques. SIAM Journal on Computing 5(2), 231–250 (1976)MATHCrossRefMathSciNetGoogle Scholar
  21. 21.
    Sippu, S., Soisalon-Soininen, E.: Parsing Theory, Vol. II: LR(k) and LL(k) Parsing. In: Simple Program Schemes and Formal Languages. LNCS, vol. 20, Springer, Heidelberg (1990)Google Scholar
  22. 22.
    Heilbrunner, S.: Tests for the LR-, LL-, and LC-Regular conditions. Journal of Computer and System Sciences 27(1), 1–13 (1983)MATHCrossRefMathSciNetGoogle Scholar
  23. 23.
    Mohri, M., Nederhof, M.J.: Regular approximations of context-free grammars through transformation. In: Junqua, J.C., van Noord, G. (eds.) Robustness in Language and Speech Technology, pp. 153–163. Kluwer Academic Publishers, Dordrecht (2001)Google Scholar
  24. 24.
    Gálvez, J.F., Schmitz, S., Farré, J.: Shift-resolve parsing: Simple, linear time, unbounded lookahead. In: Ibarra, O.H., Yen, H.-C. (eds.) CIAA 2006. LNCS, vol. 4094, pp. 253–264. Springer, Heidelberg (2006)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Sylvain Schmitz
    • 1
  1. 1.Laboratoire I3S, Université de Nice - Sophia Antipolis & CNRSFrance

Personalised recommendations