Efficient evaluation of circular attribute grammars
- 1 July 1990
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 12 (3) , 429-462
- https://doi.org/10.1145/78969.78971
Abstract
We present efficient algorithms for exhaustive and incremental evaluation of circular attributes under any conditions that guarantee finite convergence. The algorithms are derived from those for noncircular attribute grammars by partitioning the underlying attribute dependency graph into its strongly connected components and by ordering the evaluations to follow a topological sort of the resulting directed acyclic graph. The algorithms are efficient in the sense that their worst-case running time is proportional to the cost of computing the fixed points of only those strongly connected components containing affected attributes or attributes directly dependent on affected attributes. When the attribute grammar is noncircular or the specific dependency graph under consideration is acyclic, both algorithms reduce to the standard optimal algorithms for noncircular attribute evaluation.Keywords
This publication has 16 references indexed in Scilit:
- Incremental Context-Dependent Analysis for Language-Based EditorsACM Transactions on Programming Languages and Systems, 1983
- A truly generative semantics-directed compiler generatorACM SIGPLAN Notices, 1982
- The Cornell program synthesizerCommunications of the ACM, 1981
- The method of attributes for data flow analysisActa Informatica, 1978
- Semantic evaluation from left to rightCommunications of the ACM, 1976
- The intrinsically exponential complexity of the circularity problem for attribute grammarsCommunications of the ACM, 1975
- Attributed translationsJournal of Computer and System Sciences, 1974
- Depth-First Search and Linear Graph AlgorithmsSIAM Journal on Computing, 1972
- Semantics of context-free languages: CorrectionTheory of Computing Systems, 1971
- Semantics of context-free languagesTheory of Computing Systems, 1968