skip to main content
10.1145/12276.13320acmconferencesArticle/Chapter ViewAbstractPublication PagesplanConference Proceedingsconference-collections
Article
Free Access

Automatic generation of fixed-point-finding evaluators for circular, but well-defined, attribute grammars

Published:01 July 1986Publication History

ABSTRACT

In the traditional formulation of attribute grammars (AGs) circularities are not allowed, that is, no attribute-instance in any derivation tree may be defined in terms of itself. Elsewhere in mathematics and computing, though, circular (or recursive) definitions are commonplace, and even essential. Given appropriate constraints, recursive definitions are well-founded, and the least fixed-points they denote are computable. This is also the case for circular AGs.

This paper presents constraints on individual attributes and semantic functions of an AG that are sufficient to guarantee that a circular AG specifies a well-defined translation and that circularly-defined attribute-instances can be computed via successive approximation. AGs that satisfy these constraints are called finitely recursive.

An attribute evaluation paradigm is presented that incorporates successive approximation to evaluate circular attribute-instances, along with an algorithm to automatically construct such an evaluator. The attribute evaluators so produced are static in the sense that the order of evaluation at each production-instance in the derivation-tree is determined at the time that each translator is generated.

A final algorithm is presented that tells which individual attributes and functions must satisfy the constraints.

References

  1. 1.Alfred V. Aho and Jeffery D. Ullman. Principles of Compiler Desiqn. Addison'Wesley, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.Bijan Arbab. Compiling Attribute Grammars into Prolog. IBM Los Angeles Scientific Center, July 1985.Google ScholarGoogle Scholar
  3. 3.W. Babich and M. Jazayeri. Data-flow Analysis: the Method of Attributes. Acta informatica , March, 1978.Google ScholarGoogle Scholar
  4. 4.L.M. Chirica and D. F. Martin. An algebraic formulation of Knuthian semantics. Mathematical Systems Theory 13:1-27, 1979.Google ScholarGoogle ScholarCross RefCross Ref
  5. 5.B. Courcelle and P. Franchi-Zannettacci. Attribute Grammars and Recursive Program Schemes. In Theoretlcal Computer Science i_/7, pages 163-191. , 1982.Google ScholarGoogle Scholar
  6. 6.Rodney Farrow. Sub-Protocol Evaluators for Attribute Grammars. In Proceedlnqs of the SIGPLA/~ 84 SYmposium on Com611~r Construction. ACM, June, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.Rodney Farrow. LINGUIST-86 Yet another translator writing system based on attribute grammars. In Proceedings of the SIGPLAN 82 symposium on Com~ Construction. ACM, June, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.Rodney Farrow. covers of Attribute Grammars and Sub-Protocol Attr1~e -- Evaluators. Technical Report, Department of Computer Science, Columbia University, New York, NY 10027, September, 1983.Google ScholarGoogle Scholar
  9. 9.H. Ganzinger, R. Giegerich, U. Moncke and R. Wilhelm. A Truly Generative Semantics- Directed Compiler Generator. In Proceedings of the SIGPLAN Symposium on Com~ Construction. ACM, June, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.Larry G. Jones and Janos Simon. Hierarchical VLSI Design Systems Based on Attribute Grammars. In Conference Record of the Thirteenth ACM Symp6s~-~ on Principles of Languages. ACM, January, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.J. B. Kam and J. D. Ullman. Global data flow analysis and iterative algorithms. ~. ACM 23(1), 19V6. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.Uwe Kastens, Br~gitte Hutt, and Erich Zimmermann. GAG:A Practical ~ G@nerator. Spring---~ag~ Berlzn-Heidelberg-New York, 1982.Google ScholarGoogle Scholar
  13. 13.U. Kastens. Ordered attribute grammars. Acta Informatica 13, 1980.Google ScholarGoogle Scholar
  14. 14.Takuya Katayama. Translation of Attribute Grammars into Procedures. ACM Transactions on Proqrammlnq Lanquages and S s_~ 6(3), July, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.K. Kennedy and J. Ramanathan. A deterministic attribute grammar svaluator based on dynamic sequencing. ACM TOPLAS i, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.K. Kennedy and S. K. Warren. Automatic generation of efficient evaluators for attribute grammars. In Conference Record of the Third ACM symposium on Prlnc-{Dles of P-~gramming Languages. ACM, Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.G. A. Kilda11. A unified approach to global program optimization, In Conference Record of the ACM S~osium on Pr-~cTDles of Programmlng Languages. ACM, October, 1973. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.D. E. Knuth. Semantics of context-free languages. Mathematica! S_~stems Theoz~f 2, 1968. correction in volume 5, number i.Google ScholarGoogle Scholar
  19. 19.Brian H. Mayoh. Attribute Grammars and Mathematical Semantics. SIAM Journal of Computing 10(3), August, 1981.Google ScholarGoogle Scholar
  20. 20.Lawrence Paulson. A Semantics-Directed Compiler Generator. In Conference Record of the Ninth ACM Symposium on Prlnc-'~ples of Lanquaggs. ACM, January, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.Kari-Jouko Raiha, M. Saarinen, M. Sarjakoski, S. Sippu, E. Soisalon-Soininen and M. Tienari. Revised R_~ort on the Compiler wri~inqs~Z-~t~ ~8. - Technical Report A-1983-I, Dept. of Computer Science, Univ. of Helsinkl, 1983.Google ScholarGoogle Scholar
  22. 22.W.A. Schulz. language Synthesis ~n a translator. P hD-~hesis,~University of Colorado, Boulder, Colorado, July, 1976.Google ScholarGoogle Scholar
  23. 23.Stephen K. Skedzeleski. Definition and Use of Attribute Reevaluatxon In A-ttribUted Grammars. PhD thesis, University of Wisconsin, Madison, Wisconsin, December, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Automatic generation of fixed-point-finding evaluators for circular, but well-defined, attribute grammars

                          Recommendations

                          Comments

                          Login options

                          Check if you have access through your login credentials or your institution to get full access on this article.

                          Sign in
                          • Published in

                            cover image ACM Conferences
                            SIGPLAN '86: Proceedings of the 1986 SIGPLAN symposium on Compiler construction
                            July 1986
                            275 pages
                            ISBN:0897911970
                            DOI:10.1145/12276

                            Copyright © 1986 Author

                            Publisher

                            Association for Computing Machinery

                            New York, NY, United States

                            Publication History

                            • Published: 1 July 1986

                            Permissions

                            Request permissions about this article.

                            Request Permissions

                            Check for updates

                            Qualifiers

                            • Article

                          PDF Format

                          View or Download as a PDF file.

                          PDF

                          eReader

                          View online with eReader.

                          eReader