Global storage cells for attributes in an attribute grammar

SummaryVery much space is needed to store the values of all attribute instances in an attributed tree at the corresponding nodes; for that reason “global cells” are often used to store values of attribute instances. But these global cells must contain “the right value at the right time”, and, therefore, not all evaluation sequences of attribute instances are admissible, if one uses global cells.In this paper we will study first the problem arising during the construction of such admissible evaluation sequences for attributed trees, if no special property of an underlying ag is presumed. This will lead to a number of restrictions on the “practically allowed” use of global cells. After that we will provide a method for the construction of admissible evaluation sequences for arbitrary attribute trees of given attribute grammars, if global cells are used in the restricted sense. The proposed method is independent of special classes of attribute grammars and can be used with arbitrary evaluator generators.

[1]  Sven Skyum,et al.  k-visit attribute grammars , 1980, Mathematical systems theory.

[2]  Ken Kennedy,et al.  Automatic generation of efficient evaluators for attribute grammars , 1976, POPL.

[3]  Rina S. Cohen,et al.  Automatic generation of near-optimal linear-time translators for non-circular attribute grammars , 1979, POPL.

[4]  Ravi Sethi,et al.  Complete register allocation problems , 1973, SIAM J. Comput..

[5]  Joost Engelfriet,et al.  Passes, Sweeps and Visits , 1981, ICALP.

[6]  Harald Ganzinger,et al.  On Storage Optimization for Automatically Generated Compilers , 1979, Theoretical Computer Science.

[7]  Gregor von Bochmann,et al.  Semantic evaluation from left to right , 1976, CACM.

[8]  Mehdi Jazayeri,et al.  Space-Efficient Storage Management in an Attribute Grammar Evaluator , 1981, TOPL.

[9]  Ravi Sethi,et al.  Pebble Games for Studying Storage Sharing , 1982, Theor. Comput. Sci..

[10]  Joost Engelfriet,et al.  Tree transducers, L systems and two-way machines (Extended Abstract) , 1978, J. Comput. Syst. Sci..

[11]  Kari-Jouko Räihä,et al.  Dynamic allocation of space for attribute instances in multi-pass evaluators of attribute grammars , 1979, SIGPLAN '79.

[12]  Mehdi Jazayeri,et al.  A Family Of Pass-Oriented Attribute Grammar Evaluators , 1978, ACM Annual Conference.

[13]  Donald E. Knuth Semantics of context-free languages: Correction , 2005, Mathematical systems theory.

[14]  Michael Sonnenschein Generierung effizienter Compilerteile durch attributierten Grammatiken verwandte Konzepte , 1983 .

[15]  Donald E. Knuth,et al.  Semantics of context-free languages , 1968, Mathematical systems theory.

[16]  Mehdi Jazayeri,et al.  A space improvement in the alternating semantic evaluator , 1980, ACM '80.