ACM Home Page
Please provide us with feedback. Feedback
Composable attribute grammars: support for modularity in translator design and implementation
Full text PdfPdf (1.29 MB)
Source Annual Symposium on Principles of Programming Languages archive
Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
Albuquerque, New Mexico, United States
Pages: 223 - 234  
Year of Publication: 1992
ISBN:0-89791-453-8
Authors
Sponsors
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 4,   Downloads (12 Months): 27,   Citation Count: 11
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/143165.143210
What is a DOI?

ABSTRACT

This paper introduces Composable Attribute Grammars (CAGs), a formalism that extends classical attribute grammars to allow for the modular composition of translation specifications and of translators. CAGs bring to complex translator writing systems the same benefits of modularity found in modern programming languages, including comprehensibility, reusability, and incremental meta-compilation. A CAG is built from several smaller component AGs, each of which solves a particular subproblem, such as name analysis or register allocation. A component AG is based upon a simplified phrase-structure that reflects the properties of its subproblem rather than the phrase-structure of the source language. Different component phrase-structures for various subproblems are combined by mapping them into a phrase-structure for the source language. Both input and output attributes can be associated with the terminal symbols of a component AG. Output attributes enable the results of solving a subproblem to be distributed back to anywhere that originally contributed part of the subproblem, e.g. transparently distributing the results of global name analysis back to every symbolic reference in the source program. After introducing CAGs by way of an example, we provide a formal definition of CAGs and their semantics. We describe a subclass of CAGs and their semantics. We describe a subclass of CAGs, called separable CAGs, that have favorable implementation properties. We discuss the novel aspects of CAGs, compare them to other proposals for inserting modularity into attribute grammars, and relate our experience using CAGs in the Linguist translator-writing system.


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
H. Alblas. Incremental simple multi-pass attribute evaluation. In Proceedings of the NGI/SION 1986 Symposium, pages 319-342, 1986.
 
2
H.-J. Boehm and W. Zwanenpoel. Parallel attribute grammar evaluation. Technical Report TR-87-55, Rice University, Houston, TX, June 1987.
 
3
 
4
The Linguist translator-writing system User's Manual, Version 6.3, Declarative Systems, Inc. Palo Alto, CA, February 1991.
 
5
 
6
 
7
C. Farnum. Prototyping optimizing compilers. PhD thesis, Department of Electrical Engineering and Computer Science, University of California at Berkeley, Berkeley, CA, December 1990.
8
9
10
 
11
N. M. Garter. Parallel incremental compilation. Technical Report 349, University of Rochester, June 1990.
12
 
13
14
15
 
16
U. Kastens. Ordered attribute grammars. Acta Informatica, 13(3):229-256, 1980.
 
17
U. Kastens, B. Hutt, and E. Zimmerman. GAG: A practical compiler generator. Number 141 in Lecture Notes in Computer Science. Springer-Verlag, 1982.
18
 
19
E. A. Klein. Attribute evaluation in parallel, in Proceedings of the Workshop of Parallel Compilation, page 8, Kingston, Ontario, May 6-8 1990.
 
20
D. Knuth. Semantics of context-free languages. Mathematical Systems Theory, 2(2):127-145, February 1968. Correction, 5 (1), 95-96, March 1971.
 
21
 
22
 
23
 
24
M. Tieman. Removing redundancy in attribute grammars. Technical Report ACA-239-87, MCC, July 1987.
25
 
26
D. A. Watt and O. L. Madsen. Extended attribute grammars. Computer Journal, 26(2):142-153, May 1983.
 
27
IEEE Standard VHDL Reference Manual. IEEE Std 1076-1087. The Institute of Electrical and Electronic Engineers, Inc. New York, NY, March 31, 1988.

CITED BY  11

Collaborative Colleagues:
R. Farrow: colleagues
T. J. Marlowe: colleagues
D. M. Yellin: colleagues