A Simpler Construction for Showing the Intrinsically Exponential Complexity of the Circularity Problem for Attribute Grammars

Attribute grammars are an extension of contextfree grammars devised by Knuth as a mechanism for including the semantics of a context-free language with the syntax of the language. The circularity problem for a grammar is to determine whether the semantics for all possible sentences (programs) in fact will be well defined. It is proved that this problem is, in general, computationally intractable. Specifically, it is shown that any deterministic algorithm which solves the problem must for infinitely many cases use an exponential amount of time. An improved version of Knuth's circularity testing algorithm is also given, which actually solves the problem within exponential time.

[1]  Journal of the Association for Computing Machinery , 1961, Nature.

[2]  Stephen A. Cook,et al.  Characterizations of Pushdown Machines in Terms of Time-Bounded Computers , 1971, J. ACM.

[3]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[4]  Alfred V. Aho,et al.  Translations on a context free grammar , 1969, STOC.

[5]  Donald E. Knuth,et al.  Examples of formal semantics , 1971, Symposium on Semantics of Algorithmic Languages.

[6]  Albert R. Meyer,et al.  WEAK MONADIC SECOND ORDER THEORY OF SUCCESSOR IS NOT ELEMENTARY-RECURSIVE , 1973 .

[7]  Mehdi Jazayeri,et al.  On attribute grammars and the semantic specification of programming languages. , 1975 .

[8]  JazayeriMehdi,et al.  The intrinsically exponential complexity of the circularity problem for attribute grammars , 1975 .

[9]  Susan L. Gerhart,et al.  Correctness-preserving program transformations , 1975, POPL '75.

[10]  S. R. Petrick,et al.  Semantic Interpretation in the REQUEST System , 1973, COLING.

[11]  George Mager,et al.  Writing Pushdown Acceptors , 1969, J. Comput. Syst. Sci..

[12]  D. Neel,et al.  Semantic attributes and improvement of generated code , 1974, ACM '74.

[13]  Jeffrey D. Ullman,et al.  Formal languages and their relation to automata , 1969, Addison-Wesley series in computer science and information processing.

[14]  Alfred V. Aho,et al.  The Theory of Parsing, Translation, and Compiling , 1972 .

[15]  Daniel J. Rosenkrantz,et al.  Attributed Translations , 1974, J. Comput. Syst. Sci..