Using cached functions and constructors for incremental attribute evaluation

10Citations
Citations of this article
7Readers
Mendeley users who have this article in their library.
Get full text

Abstract

This paper presents a technique for the efficient incremental evaluation of Attribute Grammars. Through its generality, the applied approach may be affective too in the evaluation of Higher order Attribute Grammars. Our approach is an extension of a simpler algorithm for incremental evaluation, where functions, corresponding to visit sequences, are cached. Consequently, attributes are now either found in the cache or they are recomputed, so there is no longer need to represent the attributed tree explicitly. We may share common subtrees, avoiding repeated attribute evaluation, thus solving a typical HAG problem. We propose the following change: instead of explicitly representing the tree and calling visit sequence functions to compute the attributes, the tree is represented through a set of visit functions corresponding to the successive visits. These functions are constructed using the visit sequences as building blocks. This technique has two major advantages. Firstly, a visit function characterizes precisely that part of the tree that would actually have been visited in the previous approach, thus increasing the number of cache hits. Secondly, copyrules may be removed during the construction phase. This results in shortcircuiting copychains and in minimizing the number of recomputed functions.

Cite

CITATION STYLE

APA

Pennings, M., Swierstra, D., & Vogt, H. (1992). Using cached functions and constructors for incremental attribute evaluation. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 631 LNCS, pp. 130–144). Springer Verlag. https://doi.org/10.1007/3-540-55844-6_132

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free