Advertisement

Incremental attribute evaluation with side-effects

  • Görel Hedin
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 371)

Abstract

We have demonstrated how an attribute grammar, augmented with operational constraints, can be used to specify the static semantics of an object-oriented language. The operational constraints have side-effects which make it possible to incrementally update attributes. This makes it possible to represent symbol tables in a natural and efficient way. A tracing technique is used to efficiently locate all affected identifier use sites after changes to symbol tables. The technique is general enough to handle the various combinations of scope rules which appear in object-oriented languages.

A mechanism for demand attributes is used, which together with the operational constraints allows the total space consumption for attributes to be kept very low. This is extremely important in order to be able to represent large programs. An object-oriented notation has been introduced which allows default definition of constraints. This gives a high degree of flexibility in the grammar specification, and is particularly useful in combination with demand attributes.

Keywords

Functional Constraint Operational Constraint Search Path Remote Access Incremental Evaluation 
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. [Beshers et al. 85]
    Beshers G., Campbell R.: Maintained and Constructor Attributes. In Proceedings of the ACM SIGPLAN 85 Symposium on Language Issues in Programming Environments. Seattle, June 1985.Google Scholar
  2. [Dahle et al. 87]
    Dahle, H.P., Löfgren, M., Madsen, O.L., Magnusson, B., The MJØLNER Project, Proceeding of the Conference held at Software Tools, Online Publications, London, 1987.Google Scholar
  3. [Demers et al. 85]
    Demers A., Rogers A., Zadeck F.K.: Attribute Propagation by Message Passing. In Proceedings of the ACM SIGPLAN 85 Symposium on Language Issues in Programming Environments. Seattle, June 1985.Google Scholar
  4. [Goldberg et al. 83]
    Goldberg A., Robson D.: Smalltalk 80. The language and its implementation. Addison-Wesley 1983.Google Scholar
  5. [Hoover 86]
    Hoover R.: Dynamically bypassing copy rule chains in attribute grammars. In Conference Record of the 13th Symposium on Principles of Programming Languages, St. Petersburg, Fla. Januray 1986.Google Scholar
  6. [Hoover et al. 86]
    Hoover R., Teitelbaum T.: Efficient Incremental Evaluation of Aggregate Values in Attribute Grammars. Proceedings of the SIGPLAN '86 Symposium on Compiler Construction, Palo Alto, June 1986.Google Scholar
  7. [Hoover 87]
    Hoover R.: Incremental Graph Evaluation. PhD Thesis. Cornell University, Dept. of Computer Science, May 1987.Google Scholar
  8. [Horwitz et al. 86]
    Horwitz S., Teitelbaum T.: Generating Editing Environments Based on Relations and Attributes. ACM TOPLAS, Vol 8, No 4, October 1986. Pages 577–608.Google Scholar
  9. [Johnson et al. 82]
    Johnson G. F., Fischer C. N.: Non-syntactic attribute flow in language based editors. In Conference Record of the 9th ACM Symposium on Principles of Programming Languages, Albuquerque, N.M., January 1982, 185–195.Google Scholar
  10. [Johnson et al. 85]
    Johnson G. F., Fischer C. N.: A meta-language and system for nonlocal incremental attribute evaluation in language-based editors. In Conference Record of the 12th ACM Symposium on Principles of Programming Languages, New Orleans, La. January 1985. 141–151.Google Scholar
  11. [Knuth 68]
    Knuth D. E.: Semantics of context-free languages. Math. Syst. Theory 2:2, June 1968, 127–145.Google Scholar
  12. [Kristensen et al. 87]
    Kristensen B. B., Madsen O.L., Møller-Pedersen B., Nygaard K.: The BETA Programming Language. In Shriver B., Wegner P. (eds.) Research Directions in Object-Oriented Programming. The MIT Press, 1987.Google Scholar
  13. [Lewis et al. 74]
    Lewis P.M., Rosenkrantz D.J., Stearns R.E.: Attributed translations. J. Computer and Systems Sciences 9:3, 279–307.Google Scholar
  14. [Meyer 87]
    Meyer B.: Eiffel: Programming for Reusability and Extendibility. SIGPLAN Notices, Vol. 22, No. 2, Feb 1987.Google Scholar
  15. [Naur 63]
    Naur P.: Revised report on the algorithmic language ALGOL 60. Comm. ACM 6:1, 1–17.Google Scholar
  16. [PLANC 79]
    PLANC Reference Manual. Norsk Data A.S. Oslo, Norway, 1979.Google Scholar
  17. [Reps 84]
    Reps T.: Generating Language-Based Environments. The MIT Press, 1984.Google Scholar
  18. [Reps et al. 85]
    Reps T., Teitelbaum T.: The Synthesizer Generator. Reference Manual. Cornell University, Dept. of Computer Science. 1985 (revised 1987).Google Scholar
  19. [Reps et al. 86]
    Reps T., Marceau C., Teitelbaum T.: Remote attribute updating for language-based editors. In Conference Record of the Thirteenth ACM Symposium on Principles of Programming Languages, St. Petersburg, Florida, January 1986. pp 1–13.Google Scholar
  20. [Schaffert et al. 86]
    Schaffert C., Cooper T., Bullis B., Kilian M., Wilpolt C.: An Introduction to Trellis/Owl. In Proceedings of OOPSLA '86. The 1986 Conference on Object-Oriented Programming Systems, Languages and Applications. SIGPLAN Notices. Vol 21 No 11, Nov 1986.Google Scholar
  21. [SIMULA 87]
    Data Processing — Programming Languages — SIMULA. Swedish Standard SS 63 61 14. SIS. Stockholm, Sweden, June 1987.Google Scholar
  22. [SIMULA-67 68]
    Dahl, O.-J., Nygaard, K.: SIMULA 67 Common Base Language. Norwegian Computing Center, Oslo, 1968. Revised 1970, 1972, and 1984.Google Scholar
  23. [Stroustrup 86]
    Stroustrup B.: The C++ Programming Language. Addison-Wesley, 1986.Google Scholar
  24. [Wirth 88]
    Wirth N.: From Modula to Oberon. Tech. Rep. ETH, Zurich, 1988.Google Scholar
  25. [Yeh 83]
    Yeh D.: On Incremental Evaluation of Ordered Attribute Grammars. BIT 23:3, 1983.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1989

Authors and Affiliations

  • Görel Hedin
    • 1
  1. 1.Dept. of Computer ScienceLund Institute of TechnologyLundSweden

Personalised recommendations