Skip to main content
Log in

Attribute storage optimization by stacks

Acta Informatica Aims and scope Submit manuscript

Summary

Storage optimization is considered for evaluators of simple multivisit, or (ℓ-)ordered, attribute grammars. A necessary and sufficient condition is formulated which has to be satisfied by such an evaluator to enable it to store the instances of a given attribute on a global stack. A simple algorithm is given that decides this condition in polynomial time. A similar algorithm can be used to decide whether the instances of the attribute can be stored in a global variable. These algorithms are static, i.e., they are used at evaluator construction time.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

References

  1. Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools, Sect. 5.9. Reading, Mass.: Addison-Wesley 1986

    Google Scholar 

  2. Bochmann, G.V.: Semantic evaluation from left to right. Commun. ACM 19, 55–62 (1976)

    Google Scholar 

  3. Deransart, P., Jourdan, M., Lorho, B.: Attribute Grammars. Lect. Notes Comput. Sci., vol. 323. Berlin Heidelberg New York: Springer 1988

    Google Scholar 

  4. Engelfriet, J.: Attribute grammars: attribute evaluation methods. In: [17], pp. 103–138

  5. Engelfriet, J., Filé, G.: Simple multi-visit attribute grammars. J. Comput. Syst. Sci. 24, 283–314 (1982)

    Google Scholar 

  6. Engelfriet, J., Filé, G.: Passes, sweeps, and visits in attribute grammars. J. ACM 36, 841–869 (1989)

    Google Scholar 

  7. Farrow, R., Yellin, D.: A comparison of storage optimizations in automatically-generated attribute evaluators. Acta Inf. 23, 393–427 (1986)

    Google Scholar 

  8. Ganzinger, H.: On storage optimizations for automatically generated compilers. In: 4th GI Conf. on Theoretical Computer Science. Lect. Notes Comput. Sci. vol. 67, pp. 132–141. Berlin Heidelberg New York: Springer 1979

    Google Scholar 

  9. Immermann, N.: Nondeterministic space is closed under complement. SIAM J. Comput. 17, 935–938 (1988)

    Google Scholar 

  10. Jazayeri, M., Pozefsky, D.: Space-efficient storage management in an attribute evaluator. ACM TOPLAS 3, 388–404 (1981)

    Google Scholar 

  11. Jourdan, M., Parigot, D.: The FNC-2 system: advances in attribute grammars technology. Rapport RR 834, INRIA Rocquencourt 1988

  12. Kastens, U.: Ordered attribute grammars. Acta Inf. 13, 229–256 (1980)

    Google Scholar 

  13. Kastens, U.: The GAG-system — a tool for compiler construction. In: [17], pp. 165–182

  14. Kastens, U.: Lifetime analysis for attributes. Acta Inf. 24, 633–652 (1987)

    Google Scholar 

  15. Kastens, U., Hutt, B., Zimmermann, E.: GAG: a practical compiler generator. Lect. Notes Comput. Sci, vol. 141. Berlin Heidelberg New York: Springer 1982

    Google Scholar 

  16. Knuth, D.E.: Semantics of context-free languages. Math. Syst. Theory 2, 127–145 (1968). Correction: Math. Syst. Theory 5, 95–96 (1971)

    Google Scholar 

  17. Lorho, B.: Methods and tools for compiler construction. Cambridge: Cambridge University Press 1984

    Google Scholar 

  18. Räihä, K.-J.: A space management technique for multi-pass attribute evaluators. PhD thesis, report A-1981-4, DCS, University of Helsinki 1981

  19. Reps, T., Demers, A.: Sublinear-space evaluation algorithms for attribute grammars. ACM TOPLAS 9, 408–440 (1987)

    Google Scholar 

  20. Saarinen, M.: On constructing efficient evaluators for attribute grammars. In: “5th ICALP”. Lect. Notes Comput. Sci., vol. 62, pp. 382–397. Berlin Heidelberg New York: Springer 1978

    Google Scholar 

  21. Sonnenschein, M.: Global storage cells for attributes in an attribute grammar. Acta Inf. 22, 397–420 (1985)

    Google Scholar 

  22. Szelepcsényi, R.: The method of forced enumeration for nondeterministic automata. Acta Inf. 26, 279–284 (1988)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Engelfriet, J., de Jong, W. Attribute storage optimization by stacks. Acta Informatica 27, 567–581 (1990). https://doi.org/10.1007/BF00277390

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF00277390

Keywords

Navigation