On LALR(k) testing

  • Seppo Sippu
  • Eljas Soisalon-Soininen
Session 7: G. Rozenberg, Chairman
Part of the Lecture Notes in Computer Science book series (LNCS, volume 115)

Abstract

The problem of testing whether or not a context-free grammar possesses the LALR(k) property is studied. The uniform problem (i.e. both the subject grammar and the integer k are problem parameters) is shown to be complete for polynomial space (PSPACE) when k is expressed in unary, and complete for nondeterministic (one-level) exponential time (NE) when k is expressed in binary. This solves an open problem by Hunt, Szymanski and Ullman, who showed that for k in binary LR(k), LL(k) and even strong LL(k) testing is NE-complete, and that LALR(k) testing is at least NE-hard. For k in unary the lower bound of the problem follows from the recently obtained result that even for fixed k ≥ 1 (i.e. only the subject grammar is a problem parameter) the problem is PSPACE-hard. Thus, the results lead to the striking conclusion that for k in binary LALR(k) testing is no harder (with respect to polynomial time reductions) than e.g. strong LL(k) testing, and for k in unary no harder than LALR(1) testing.

Keywords

Deterministic Time Membership Problem General String Valid Item Current Item 
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.

References

  1. 1.
    Aho,A.V., and J.D.Ullman, The Theory of Parsing, Translation and Compiling. Vol. 1: Parsing. Prentice-Hall, 1972.Google Scholar
  2. 2.
    Harrison,M.A., Introduction to Formal Language Theory. Addison-Wesley, 1978.Google Scholar
  3. 3.
    Hunt, H.B., III, T.G. Szymanski and J.D. Ullman, On the Complexity of LR(k) Testing. Comm. ACM 18 (1975), 707–716.Google Scholar
  4. 4.
    Knuth, D.E., On the Translation of Languages from Left to Right. Information and Control 8 (1965), 607–639.Google Scholar
  5. 5.
    Rosenkrantz, D.J., and R.E. Stearns, Properties of Deterministic Top-Down Grammars. Information and Control 17 (1970), 226–256.Google Scholar
  6. 6.
    Sippu,S., and E.Soisalon-Soininen, Characterizations of the LL(k) Property. In: Automata, Languages and Programming, Seventh Colloquium, Noordwijkerhout, July 1980. Springer-Verlag, 1980, 596–608.Google Scholar
  7. 7.
    Ukkonen,E., and E.Soisalon-Soininen, LALR(k) Testing Is PSPACE-Complete. To be presented at the Thirteenth ACM Symposium on Theory of Computing, Milwaukee, May 1981.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1981

Authors and Affiliations

  • Seppo Sippu
    • 1
  • Eljas Soisalon-Soininen
    • 1
  1. 1.Department of Computer ScienceUniversity of HelsinkiHelsinki 25Finland

Personalised recommendations