skip to main content
article
Open access

On the optimality of change propagation for incremental evaluation of hierarchical attribute grammars

Published: 01 January 1996 Publication History

Abstract

Several new attribute grammar dialects have recently been developed, all with the common goal of allowing large, complex language translators to be specified through a modular composition of smaller attribute grammars. We refer to the class of dialects as hierarchical attribute grammars. In this short article, we present a characterization of optimal incremental evaluation that indicates the unsuitability of change propagation as the basis of an optimal incremental evaluator for hierarchical attribute grammars. This result lends strong support to the use of incremental evaluators based on more applicative approaches to attribute evaluation, such as Carle and Pollock's evaluator based on more applicative approaches to attribute evaluation, such as Carle and Pollock's evaluator based on caching of partially attributed subtree, Pugh's evaluator based on function caching of semantic functions, and Swierstra and Vogt's evaluator based on functions, and Swierstra and Vogt's evaluator based on function caching of visit sequences.

References

[1]
CARLE, A. 1992. Hierarchical attribute grammars: Dialects, applications and evaluation algorithms. Ph.D. thesis, Dept. of Computer Science, Rice Univ., Houston, Tex.
[2]
eARLE, t. AND POLLOCK, L. 1995a. A context-based incremental evaluator for hierarchical attribute grammars. J. Program. Lang. 3, 1-29.
[3]
CARLE, A. AND POLLOCK, L. 1995b. Matching-based incremental evaluators for hierarchical attribute grammar dialects. A CM Trans. Program. Lang. Syst. 17, 2, 394-429.
[4]
eARLE, t. AND POLLOCK, L. L. 1990. Incremental evaluation for modular attribute grammars. Tech. Rep. TR90-103, Rice Univ., Houston, Tex. Jan.
[5]
FRANCHI-ZANNETTACCI, P. 1982. Attributs s6mantiques et sch6mas de programmes. Ph.D. thesis, Universit6 de Bordeaux I, Bordeaux, France.
[6]
GANZINGER, H. AND GIEGERICH, R. 1984. Attribute coupled grammars. In Proceedings of the SIGPLAN '84 Symposium on Compiler Construction (Montreal, Canada). ACM, New York, 157-170.
[7]
GANZINGER, H., GIEGERICH, R., AND VACH, M. 1986. MARVIN: A tool for applicative and modular compiler specifications. Forschungsbericht Nr. 220. Univ. of Dortmund, Dortmund, Germany.
[8]
HOOVER, R. 1987. Incremental graph evaluation. Ph.D. thesis, Dept. of Computer Science, Cornell Univ., Ithaca, N.Y.
[9]
JIA, X. AND QIAN, J. 1985. Incremental evaluation of attributed grammars for incremental programming environments. In IEEE COMPSAC'85 (Chicago, Ill.). IEEE, New York, 342-349.
[10]
JONES, L. G. 1990. Efficient evaluation of circular attribute grammars. ACM Trans. Program. Lang. Syst. 12, 3 (July), 429-462.
[11]
JONES, L. G. AND SIMON, J. 1986. Hierarchical VLSI design systems based on attribute grammars. In Proceedings of the 13th Annual Symposium on Principles of Programming Languages. ACM, New York, 58-69.
[12]
KATAYAMA, T. 1984. Translation of attribute grammars into procedures. ACM Trans. Program. Lang. Syst. 6, 3 (July), 345-369.
[13]
PUGH, W. W., JR. 1988. Incremental computation and the incremental evaluation of function programs. TR 88-936. Ph.D. thesis, Dept. of Computer Science, Cornell Univ., Ithaca, N.Y.
[14]
REPS, T. 1982. OptimM-time incremental semantic analysis for syntax-directed editors. In Proceedings of the 9th Annual Symposium on Principles of Programming Languages. ACM, New York, 169-176.
[15]
REPS, T. W. 1984. Generating Language-Based Environments. The MIT Press, Cambridge, Mass.
[16]
REPS, T. W. AND TEITELBAUM, T. 1989. The Synthesizer Generator: A System for Constructing Language-Based Editors. Springer-Verlag, New York.
[17]
REPS, T., TEITELBAUM, T., AND DEMERS, t. 1983. Incremental context-dependent analysis for language-based editors. ACM Trans. Program. Lang. Syst. 5, 3 (July), 449-477.
[18]
SCHULZ, W. t. 1976. Semantic analysis and target language synthesis in a translator. Ph.D. thesis, Dept. of Computer Science, Univ. of Colorado, Boulder, Colo.
[19]
SWIERSTRA, D. AND VOGT, H. 1991. Higher order attribute grammars. In Attribute Grammars, Applications and Systems. Lecture Notes in Computer Science, vol 545. Springer-Verlag, New York, 256-296.
[20]
TEITELBAUM, T. AND CHAPMAN, R. 1990. Higher-order attribute grammars and editing environments. In Proceedings of the SIGPLAN '90 Symposium on Programming Language Design and Implementation. ACM, New York, 197-208.
[21]
VOGT, H. H., SWIERSTRA, S. D., AND KUIPER, M. F. 1989. Higher order attribute grammars. In Proceedings of the SIGPLAN '89 Symposium on Programming Language Design and Implementation. ACM, New York, 131-145.
[22]
WALZ, J. t. AND JOHNSON, G. F. 1988. Incremental evaluation for a general class of circular attribute grammars. In Proceedings of the SIGPLAN '88 Symposium on Programming Language Design and Implementation. ACM, New York, 209-221.
[23]
YEH, D. 1983. On incremental evaluation of ordered attributed grammars. Bit 23, 308-320.
[24]
YEH, D. AND KASTENS, U. 1988. Improvements of an incremental evaluation algorithm for ordered attribute grammars. SIGPLAN Not. 23, 12 (Dec.), 45-50.

Cited By

View all

Recommendations

Reviews

James Dennis Kiper

Attribute grammars have proven their utility for the specification of programming language translators. When applied to complex languages, these attribute grammars are likewise complex. Modular composition of smaller attribute grammars provides a structure for making a large complex attribute grammar easier to understand, develop, and maintain. In this paper, Carle and Pollock refer to these attribute grammar dialects as hierarchical attribute grammars. One of the goals of research on attribute grammars has been efficient incremental evaluation of attribute values. One of the most common approaches is based on change propagation. When an attributed syntax tree is modified, the affected attributes must be modified. When applied to hierarchical attribute grammars, change propagation cannot be isolated to each module. This means that change propagation algorithms cannot be limited to an examination of those modules that have been modified. The authors present an analysis that shows that change propagation is unsuitable for achieving an optimal incremental evaluator for hierarchical attribute grammars. Carle and Pollock conclude this paper with three examples of incremental evaluation algorithms that use a more applicative approach to achieving optimality.

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Programming Languages and Systems
ACM Transactions on Programming Languages and Systems  Volume 18, Issue 1
Jan. 1996
108 pages
ISSN:0164-0925
EISSN:1558-4593
DOI:10.1145/225540
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 January 1996
Published in TOPLAS Volume 18, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. attribute grammar
  2. change propagation
  3. incremental evaluation
  4. optimality

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)49
  • Downloads (Last 6 weeks)5
Reflects downloads up to 06 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media