Year: 1983
Type: article
Abstract: Knowledge of a programming language's grammar allows language-based editors to enforce syntactic correctness at all times during development by restricting editing operations to legitimate modifications ot ~ the program's context-free derivation tree; however, not all language constraints can be enforced in this way because not all features can be described by the context-free formalism.Attribute grammars permit context-dependent language features to be expressed in a modular, declarative fashion and thus are a good basis for specifying language-based editors.Such editors represent programs as attributed trees, Which are modified by operations such as subtree pruning and grafting.Incremental analysis is performed by updating attribute values after every modification.This paper discusses how updating can be carried out and presents several algorithms for the task, including one that is asymptotically optimal in time.
DOI: 10.1145/2166.357218
Authors: Thomas Reps, Tim Teitelbaum, Alan Demers
Institution: Cornell University
Language: English
Subfield: Software
Field: Computer Science
Domain: Physical Sciences
Open Access status: bronze
Funder: National Science Foundation
OpenAlex ID: W2029068974
