|
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.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
Alfred V. Aho , Ravi Sethi , Jeffrey D. Ullman, Compilers: principles, techniques, and tools, Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 1986
|
| |
2
|
ALBL^S, H. Incremental simple multi-pass attribute evaluation. In Proceedings of the NGI/ SION 1986 Symposium. 1986, pp. 319-342.
|
| |
3
|
|
| |
4
|
BABICH, W. A., AND JAZAYERI, M. The method of attributes for data flow analysis. Part I: Exhaustive analysis. Acta Inf. 10, 3 (Oct. 1978), 245-264.
|
 |
5
|
|
 |
6
|
|
 |
7
|
|
| |
8
|
CHEBOTAR, K.S. Some modifications of Knuth's algorithm for verifying cyclicity of attribute grammars. Program. Comput. Softw. 7, I (Feb. 1981), 58-61.
|
 |
9
|
|
 |
10
|
|
| |
11
|
DERANSART, P., JOURDAN, M., AND LORHO, B. Speeding up circularity tests for attribute grammars. Acta Inf. 21, 4 (Nov. 1984), 375-391.
|
 |
12
|
|
 |
13
|
|
 |
14
|
|
 |
15
|
Harald Ganzinger , Robert Giegerich , Ulrich Möncke , Reinhard Wilhelm, A truly generative semantics-directed compiler generator, Proceedings of the 1982 SIGPLAN symposium on Compiler construction, p.172-184, June 23-25, 1982, Boston, Massachusetts, United States
|
 |
16
|
|
 |
17
|
|
 |
18
|
|
 |
19
|
|
| |
20
|
|
 |
21
|
|
| |
22
|
JOURDAN, M., AND PARIGOT, D. More on speeding up circularity tests for attribute grammars. INRIA Rapports de Recherche No. 828, 1988 Institut National de Rocherche en Inform, Rocquencourt, France.
|
| |
23
|
KASTENS, U. Ordered attribute grammars. Acta Inf. 13, 3 (March 1980), 229-256.
|
| |
24
|
KASTENS, V., HUTT, B., AND ZIMMERMAN, r. GAG.' A Practical Compiler Generator. Lecture Notes in Computer Science, vol. 141. Springer-Verlag, New York, 1982.
|
 |
25
|
|
 |
26
|
|
| |
27
|
|
| |
28
|
KNUTH, D. E. Semantics of context-flee languages. Math. Syst. Theory 2, 2 (June 1968), 127-145.
|
| |
29
|
KNUTH, D.E.Semantics of context-free languages: Correction. Math. Syst. Theory 5, I (Mar. 1971), 95-96.
|
| |
30
|
LEWIS, P. M., ROSENKRANTZ, n. J., AND STEARNS, R.E. Attributed translations. J. Comput. Syst. Sci. 9, 3 (Dec. 1974), 279-307.
|
| |
31
|
LORHO, B., AND PAIR, C. Algorithms for checking consistency of attribute grammars. In Proving and Improving Programs. Symposium IRIA. (Arc-et-Senans, France) 1975, 29-54.
|
| |
32
|
R~,IH.~., K. J., AND SAARINEN, M. Testing attribute grammars for circularity. Acta Inf. 17, 2 (June 1982), 185-192.
|
 |
33
|
|
| |
34
|
|
 |
35
|
|
 |
36
|
|
 |
37
|
|
| |
38
|
SKEDZELESKI, S.K. Definition and use of attribute reevaluation in attributed grammars. Tech. Rep. 340, Dept. of Computer Science, Univ. of Wisconsin, Madison, Wisconsin, 1978.
|
| |
39
|
|
| |
40
|
TARJAN, R.E. Depth first search and linear graph algorithms. SIAM J. Comput. 1, 2 (June 1972), 146-160.
|
 |
41
|
|
| |
42
|
|
 |
43
|
|
| |
44
|
YEH, D. On incremental evaluation of ordered attributed grammars. BIT 23, 3 (1983), 308-320.
|
CITED BY 13
|
|
|
|
|
|
|
|
R. Farrow , T. J. Marlowe , D. M. Yellin, Composable attribute grammars: support for modularity in translator design and implementation, Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.223-234, January 19-22, 1992, Albuquerque, New Mexico, United States
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
REVIEW
"Gabriel M. Ciobanu : Reviewer"
Attribute grammars have proven to be useful in the specification of
static semantics of programming languages; this specification is used,
for example, by compiler generation systems or for language-based
editors. Recently, interest has arisen
more...
|