eCommons

 

Incremental Attribute Evaluation and Multiple Subtree Replacements

dc.contributor.authorPeckham, Stephen B.en_US
dc.date.accessioned2007-04-23T17:45:06Z
dc.date.available2007-04-23T17:45:06Z
dc.date.issued1990-02en_US
dc.description.abstractThe standard model for incremental attribute evaluation allows single subtree replacements followed by attribute reevaluation to restore consistency to a derivation tree. This thesis advocates an extended model that allows multiple subtree replacements. A static (tree-walking) algorithm for performing incremental updating after such changes is developed. The algorithm cannot be used with all attribute grammars, but is restricted to grammars contained in the new class of "globally partitionable attributer grammars" (GPAGs). A test for determining whether an attribute grammar is GPAG is described. The multiple subtree replacement algorithm (GPAG-evaluate) in this thesis improves on two shortcomings of existing algorithms. First, many evaluators have a running time that depends linearly on the size of the derivation tree of on the number of concurrent subtree replacements. GPAG-evaluate has a running time of $O$(log $n \cdot$ |AFFECTED|), where $n$ is the number of nodes in the derivation tree and AFFECTED is the set of attributes needing reevaluation. Second, experience with incremental, attribute grammar-based environments demonstrates that dynamic evaluators are noticeably slower than static evaluators because they require time-consuming data structure manipulations. Most existing algorithms for multiple subtree replacements are dynamic, but GPAG-evaluate is static. A second problem treated in this thesis is asynchronous subtree replacements, that is, allowing changes to be made while propagation continues after previous changes. A method for analyzing the efficiency of asynchronous subtree replacement algorithms is presented. An asynchronous evaluator (ASYNCH-evaluate) is described that, like GPAG-evaluate, guarantees that no attributes will be evaluated unnecessarily. Under some restrictions, ASYNCH-evaluate is as efficient as GPAG-evaluate. In particular, propagation in trees containing dynamically generated, nonlocal dependency edges can be supported. Both GPAG-evaluate and ASYNCH-evaluate must find lowest common ancestors of nodes in a tree where subtree replacements were made. A simple technique performs this operation in time $O(n)$. To make the evaluators more efficient, this thesis describes an algorithm that uses self-adjusting binary trees to perform the necessary operations in amortized $O$(log $n$) time. These operations are not restricted to attributed derivation trees, but can be used for any application using trees.en_US
dc.format.extent11951005 bytes
dc.format.extent2357193 bytes
dc.format.mimetypeapplication/pdf
dc.format.mimetypeapplication/postscript
dc.identifier.citationhttp://techreports.library.cornell.edu:8081/Dienst/UI/1.0/Display/cul.cs/TR90-1093en_US
dc.identifier.urihttps://hdl.handle.net/1813/6933
dc.language.isoen_USen_US
dc.publisherCornell Universityen_US
dc.subjectcomputer scienceen_US
dc.subjecttechnical reporten_US
dc.titleIncremental Attribute Evaluation and Multiple Subtree Replacementsen_US
dc.typetechnical reporten_US

Files

Original bundle
Now showing 1 - 2 of 2
Loading...
Thumbnail Image
Name:
90-1093.pdf
Size:
11.4 MB
Format:
Adobe Portable Document Format
No Thumbnail Available
Name:
90-1093.ps
Size:
2.25 MB
Format:
Postscript Files