Advertisement

Incremental attribute evaluation

  • Henk Alblas
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 545)

Abstract

Transformations of attributed derivation trees are considered. A tree transformation may invalidate attribute instances, not only in the restructured part of the tree, but also elsewhere in the tree. To make the attribution of the tree correct again requires a reevaluator. For some evaluation strategies, reevaluators are defined that work optimally in the number of visits to tree nodes and the number of recomputations.

To remove the restriction that every transformation of an attributed derivation tree should immediately be followed by a reevaluation of the tree, criteria are formulated that permit a delay in calling the reevaluator. These criteria allow a strategy of repeatedly applying alternate attribute-evaluation and tree-transformation phases. An attribute-evaluation phase consists of a tree walk in which all attributes receive their correct values. A tree-transformation phase consist of a tree walk in which as many tree transformations are performed as possible. The transformation phase is never interrupted to carry out reevaluation. Finally, the optimal-incremental strategy is applied to the case where there has been a delay in activating the reevaluator.

Keywords

Attribute Evaluation Derivation Tree Incremental Evaluation Evaluation Rule Attribute Instance 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Alblas, H.: Incremental simple multi-pass attribute evaluation. In: Proc. NGI-SION 1986 Symposium, 319–342 (1986).Google Scholar
  2. 2.
    Alblas, H.: One-pass transformations of attributed program trees. Acta Informatica 24, 299–352 (1987).CrossRefGoogle Scholar
  3. 3.
    Alblas, H.: Pass-oriented attribute evaluation and attributed tree transformations. Ph.D. Thesis, University of Twente (1987).Google Scholar
  4. 4.
    Alblas, H.: Optimal incremental simple multi-pass attribute evaluation. Information Processing Letters 32, 289–295 (1989).CrossRefGoogle Scholar
  5. 5.
    Alblas, H.: Iteration of transformation passes over attributed program trees. Acta Informatica 27, 1–40 (1989).CrossRefGoogle Scholar
  6. 6.
    Alblas, H.: Attributed tree transformations with delayed and smart re-evaluation. In: Compiler Compilers and High Speed Compilation (D. Hammer, ed.), Lecture Notes in Computer Science 371 (1989), 160–174, Springer.Google Scholar
  7. 7.
    Alblas, H.: Attributed tree transformations with delayed and smart re-evaluation. In: Proc. Workshop Compiler Compiler and High Speed Compilation, Inform. Inf. Rep. 3 (Akademie der Wissenschaften der DDR), 334–348 (1989).Google Scholar
  8. 8.
    H. Alblas: Concurrent Incremental Attribute Evaluation, In: Attribute Grammars and their Applications (P. Deransart, M. Jourdan, eds.), Lecture Notes in Computer Science 461 (1990), 343–358, Springer.Google Scholar
  9. 9.
    Alblas, H.: Attribute evaluation methods, elsewhere in these proceedings.Google Scholar
  10. 10.
    Carle, A. and Pollock, L.: Modular specification of incremental program transformation systems. In: Proc. 11th International Conference on Software Engineering, 178–187 (1989).Google Scholar
  11. 11.
    Demers, A., Reps, T. and Teitelbaum, T.: Incremental evaluation for attribute grammars with application to syntax-directed editors. In: Proc. 8th ACM Symposium on Principles of Programming Languages, 105–116 (1981).Google Scholar
  12. 12.
    Demers, A., Rogers, A. and Zadeck, F.K.: Attribute propagation by message passing. In: Proc. ACM SIGPLAN 85 Symposium on Language Issues in Programming Environments, 43–59 (1985).Google Scholar
  13. 13.
    DeRemer, F.L.: Transformational grammars. In: Compiler Construction: An advanced course, F.L. Bauer, J. Eickel (eds.). Lecture Notes in Computer Science 21 (1974), 121–145, Springer.Google Scholar
  14. 14.
    Engelfriet, J.: Attribute grammars: Attribute evaluation methods. In: Methods and Tools for Compiler Construction (B. Lorho, ed.) (1984), 103–138, Cambridge University Press.Google Scholar
  15. 15.
    Feng, A., Kikuno, T. and Torii, K.: Incremental attribute evaluation for multiple subtree replacements in structure-oriented environments, In: Attribute Grammars and their Applications (P. Deransart, M. Jourdan, eds.), Lecture Notes in Computer Science 461 (1990), 192–206, Springer.Google Scholar
  16. 16.
    Ganzinger, H. and Giegerich, R.: A truly generative semantics directed compiler generator. In: Proc. SIGPLAN 1982 Symposium on Compiler Construction, SIGPLAN Notices 17, (6), 172–184 (1982).Google Scholar
  17. 17.
    Giegerich, R., Möncke, U., Wilhelm, R.: Invariance of approximative semantics with respect to program transformations. In: Informatik-Fachberichte 50 (1981), 1–10, Springer.Google Scholar
  18. 18.
    Glasner, I., Möncke, U. and Wilhelm, R.: OPTRAN, a language for the specification of program transformations. In: Informatik Fachberichte 34 (1980), 125–142, Springer.Google Scholar
  19. 19.
    Hoover, R.: Dynamically bypassing copy rule chains in attribute grammars. In: Proc. 13th Annual Symposium on Principles of Programming Languages, 14–25 (1986).Google Scholar
  20. 20.
    Hoover, R. and Teitelbaum, T.: Efficient incremental evaluation of aggregate values in attribute grammars. In: Proc. SIGPLAN '86 Symposium on Compiler Construction, 39–50 (1986).Google Scholar
  21. 21.
    Kaplan, S.M. and Kaiser, G.E.: Incremental attribute evaluation in distributed language environments. In: Fifth Annual ACM Symposium on Principles of Distributed Computing, 121–130 (1986).Google Scholar
  22. 22.
    Lipps, P., Möncke, U., Olk, M. and Wilhelm, R.: Attribute re(evaluation) in OPTRAN. Acta Informatica 26, 213–239 (1988).CrossRefGoogle Scholar
  23. 23.
    Möncke, U., Weisgerber, B. and Wilhelm, R.: How to implement a system for manipulation of attributed trees. In: Informatik-Fachberichte 77 (1984), 112–127, Springer.Google Scholar
  24. 24.
    Peckham, S.B.: Globally partitionable attribute grammars, In: Attribute Grammars and their Applications (P. Deransart, M. Jourdan, eds.), Lecture Notes in Computer Science 461 (1990), 327–342, Springer.Google Scholar
  25. 25.
    Räihä, K.-J. and Saarinen, M.: An optimization of the alternating semantic evaluator. Information Processing Letters 6, 97–100 (1977).CrossRefGoogle Scholar
  26. 26.
    Reps, T.: Generating Language-Based Environments. The MIT Press, Cambridge, MA, 1984.Google Scholar
  27. 27.
    Reps, T.: Incremental evaluation for attribute grammars with unrestricted movement between tree modifications, Acta Informatica 25, 155–178 (1988).MathSciNetGoogle Scholar
  28. 28.
    Reps, T., Marceau, C. and Teitelbaum, T.: Remote attribute updating for language-based editors. In: Proc. 13th ACM Symposium on Principles of Programming Languages, 1–13 (1986).Google Scholar
  29. 29.
    Reps, T., Teitelbaum, T. and Demers, A.: Incremental context-dependent analysis for language-based editors. ACM Transactions on Programming Languages and Systems 5, 449–477 (1983).CrossRefGoogle Scholar
  30. 30.
    Reps, T. and Teitelbaum, T.: The synthesizer generator. In: Proc. ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, 42–48 (1984).Google Scholar
  31. 31.
    Reps, T. and Teitelbaum, T.: The synthesizer generator. In: Proc. SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, In: Special Issue of SIGPLAN Notices 19 (5), 41–48 (1984).Google Scholar
  32. 32.
    Reps, T. and Teitelbaum, T.: The synthesizer generator reference manual. Report TR 84–619, Dept. of Computer Science, Cornell University (1984).Google Scholar
  33. 33.
    Reps, T. and Teitelbaum, T.: The Synthesizer Generator: Reference Manual. Cambridge, MA, second edition, 1987.Google Scholar
  34. 34.
    Reps, T. and Teitelbaum, T.: The Synthesizer Generator: A System for Constructing Language Based Editors. Springer, 1989.Google Scholar
  35. 35.
    Teitelbaum, T. and Reps, T.: The Cornell program synthesizer: a syntax-directed programming environment. Comm. ACM 24, 563–573 (1981).CrossRefGoogle Scholar
  36. 36.
    Vorthmann, A.: Coordinated incremental attribute evaluation on a DR-threaded tree, In: Attribute Grammars and their Applications (P. Deransart, M. Jourdan, eds.), Lecture Notes in Computer Science 461 (1990), 207–221, Springer.Google Scholar
  37. 37.
    Wilhelm, R.: Computation and use of data flow information in optimizing compilers. Acta Informatica 12, 209–225 (1979).CrossRefGoogle Scholar
  38. 38.
    Yeh, D.: On incremental evaluation of ordered attribute grammars. BIT 23, 308–320 (1983).Google Scholar
  39. 39.
    Yeh, D. and Kastens, U.: Improvements on an incremental evaluation algorithm for ordered attribute grammars. SIGPLAN Notices 23 (12), 45–50, (1988).Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • Henk Alblas
    • 1
  1. 1.Department of Computer ScienceUniversity of TwenteAE EnschedeThe Netherlands

Personalised recommendations