Skip to main content

On the optimal assignment of attributes to passes in multi-pass attribute evaluators

  • Conference paper
  • First Online:
Automata, Languages and Programming (ICALP 1980)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 85))

Included in the following conference series:

Abstract

The problem of constructing multi-pass evaluators for attribute grammars is studied. The algorithm used heretofore is demonstrated to be able to produce evaluators which perform almost twice as many passes through the parse tree as necessary. The problem of constructing a shortest possible evaluation order is then shown to be NP-complete. Based on a new characterization of multi-pass attribute grammars, a modified construction algorithm is then developed. The new heuristics is motivated by experience with real grammars.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Alblas,H.: The limitations of attribute evaluation in passes. Manuscript, Department of Applied Mathematics, Twente University of Technology, Enschede, Dec. 1979.

    Google Scholar 

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

    Google Scholar 

  3. Cohen,R. and Harry,E.: Automatic generation of near-optimal linear-time translators for non-circular attribute grammars. Conf. Record of the Sixth ACM Symposium on Principles of Programming Languages, 1979, 121–134.

    Google Scholar 

  4. Jazayeri, M.: On attribute grammars and the semantic specification of programming languages. Report 1159, Jennings Computing Centre, Case Western Reserve University, Cleveland, Ohio, Oct. 1974.

    Google Scholar 

  5. Jazayeri, M.: Live variable analysis, attribute grammars, and program optimization. Manuscript, Dept. of Computer Science, Univ. of North Carolina, Chapel Hill, N.C., March 1975.

    Google Scholar 

  6. Jazayeri, M. and Pozefsky, D.: Algorithms for efficient evaluation of multi-pass attribute grammars without a parse tree. Report TR 77-001, Dept. of Computer Science, Univ. of North Carolina, Chapel Hill, N.C., Feb. 1977 (revised May 1979).

    Google Scholar 

  7. Jazayeri,M. and Walter,K.G.: Alternating semantic evaluator. Proc. of the ACM Annual Conference, Oct. 1975, 230–234.

    Google Scholar 

  8. Kennedy,K. and Warren,S.K.: Automatic generation of efficient evaluators for attribute grammars. Conf. Record of the Third ACM Symposium on Principles of Programming Languages, 1976, 32–49.

    Google Scholar 

  9. Knuth, D.E.: Semantics of context-free languages. Mathematical Systems Theory 2,2 (1968), 127–145. Correction in Mathematical Systems Theory 5,1 (1971), 95–96.

    Google Scholar 

  10. Maier, D.: The complexity of some problems on subsequences and supersequences. Journal of the ACM 25,2 (April 1978), 322–336.

    Google Scholar 

  11. Pozefsky, D.: Building efficient pass-oriented attribute evaluators. Report TR 79-006, Dept. of Computer Science, Univ. of North Carolina, Chapel Hill, N.C., 1979.

    Google Scholar 

  12. Pozefsky,D. and Jazayeri,M.: A family of pass-oriented attribute grammar evaluators. Proc. of the ACM Annual Conference, Dec. 1978, 261–270.

    Google Scholar 

  13. Räihä, K.-J.: On attribute grammars and their use in a compiler writing system. Report A-1977-4, Dept. of Computer Science, Univ. of Helsinki, Helsinki, Aug. 1977.

    Google Scholar 

  14. Räihä, K.-J.: Experiences with the compiler writing system HLP. Proc. of the Aarhus Workshop on Semantics-Directed Compiler Generation, Springer-Verlag, Berlin — Heidelberg — New York, 1980.

    Google Scholar 

  15. Räihä, K.-J., Saarinen, M., Soisalon-Soininen, E. and Tienari, M.: The compiler writing system HLP (Helsinki Language Processor). Report A-1978-2, Dept. of Computer Science, Univ. of Helsinki, Helsinki, March 1978.

    Google Scholar 

  16. Räihä, K.-J. and Ukkonen, E.: The shortest common supersequence problem over binary alphabet is NP-complete. Report C-1979-95, Dept. of Computer Science, Univ. of Helsinki, Helsinki, Sept. 1979.

    Google Scholar 

  17. Räihä, K.-J. and Ukkonen, E.: Minimizing the number of evaluation passes for attribute grammars. Report C-1979-121, Dept. of Computer Science, Univ. of Helsinki, Helsinki, Nov. 1979.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jaco de Bakker Jan van Leeuwen

Rights and permissions

Reprints and permissions

Copyright information

© 1980 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Räihä, KJ., Ukkonen, E. (1980). On the optimal assignment of attributes to passes in multi-pass attribute evaluators. In: de Bakker, J., van Leeuwen, J. (eds) Automata, Languages and Programming. ICALP 1980. Lecture Notes in Computer Science, vol 85. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-10003-2_94

Download citation

  • DOI: https://doi.org/10.1007/3-540-10003-2_94

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-10003-4

  • Online ISBN: 978-3-540-39346-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics