Abstract
The adequacy of attribute grammars as a compiler writing tool is studied on the basis of the experiences on attribute grammars for Pascal and a subset of Euclid. A qualitative assessment of the grammars shows that the compiler oriented view in the design of an attribute grammar tends to make the grammar hard to understand. A design discipline is proposed to improve the comprehensibility of the grammar. Quantitative measurements of the automatically generated compilers suggest that an efficient compiler can be produced from an attribute grammar. To achieve this, a carefully optimized implementation of the compiler-compiler is required.
- 1 A.V.Aho, Translator Writing Systems: Where Do They Now Stand? Computer 13 (Aug. 1980), 9-14.Google ScholarDigital Library
- 2 B.Asbrock, U.Kastens and E.Zimmermann, Generating an Efficient Compiler Front-End. Bericht Nr. 17/81, Fakultät für Informatik, Universität Karlsruhe, 1981.Google Scholar
- 3 J.R.Cordy and R.C.Holt, Specification of Concurrent Euclid (Preliminary Version). Technical Report CSRG-115, Computer Systems Research Group, University of Toronto, July 1980.Google Scholar
- 4 H.Erkiö, J.Sajaniemi and A.Salava, An Implementation of Pascal on the Burrougs B6700. Report A-1977-1, Department of Computer Science, University of Helsinki, May 1977.Google Scholar
- 5 R.Farrow, Experiences with an Attribute Grammar-Based Compiler. Conference Record of the Ninth Annual ACM Symposium on Principles of Programming Languages, Jan. 1982, 95-107. Google ScholarDigital Library
- 6 G.Goos and G.Winterstein, Problems in Compiling Ada. Trends in Information Processing Systems, A.J.W.Duijvestijn and P.C.Lockemann (eds.), Springer-Verlag, Berlin - Heidelberg-New York, 1981, 173-199. Google ScholarDigital Library
- 7 K.Hiitola, An Analysis of the Static Semantics of Pascal (in Finnish). Department of Computer Science, University of Helsinki, in preparation.Google Scholar
- 8 M.Jazayeri and D.Pozefsky, Space-Efficient Storage Management in an Attribute Grammar Evaluator. ACM Transactions on Programming Languages and Systems 3, 4 (Oct. 1981), 388-404. Google ScholarDigital Library
- 9 M.Jazayeri and K.G.Walter, Alternating Semantic Evaluator. Proceedings of the ACM 1975 Annual Conference, Oct. 1975, 230-234. Google ScholarDigital Library
- 10 K.Koskimies, An Experience on Language Implementation Using Attribute Grammars. Report A-1982-2, Department of Computer Science, University of Helsinki, March 1982.Google Scholar
- 11 K.Koskimies, L.Juutinen and J.Paakki, An Attribute Grarmmar for C-Euclid. Computer Listing, Department of Computer Science, University of Helsinki, March 1982.Google Scholar
- 12 K.Koskimies and K.-J.Räihä, On the Use of Attribute Grammars for Describing One-Pass Translation. Manuscript, Department of Computer Science, University of Helsinki, Aug. 1981.Google Scholar
- 13 B.Lampson, J.J.Horning, R.L.London, J.G. Mitchell and G.J.Popek, Report on the Programming Language Euclid. SIGPLAN Notices 12, 2 (Feb. 1977). Google ScholarDigital Library
- 14 P.M.Lewis, D.J.Rosenkrantz and R.E.Stearns, Attributed Translations. Journal of Computer and Systems Sciences 9 (Dec. 1974), 279-307.Google ScholarDigital Library
- 15 M. Marcotty, H.F.Ledgard and G.Bochmann, A Sampler of Formal Definitions. Computing Surveys 8, 2 (June 1976), 191-276. Google ScholarDigital Library
- 16 K.-J.Räihä A Space Management Technique for Multi-Pass Attribute Evaluators. Ph.D. Thesis, Report A-1981-4, Department of Computer Science, University of Helsinki, Sept. 1981.Google Scholar
- 17 K.-J.Räihä, M. Saarinen, E.Soisalon-Soininen and M.Tienari, The Compiler Writing System HLP (Helsinki Language Processor). Report A-1978-2, Department of Computer Science, University of Helsinki, March 1978.Google Scholar
- 18 K.Ripken, Application of Meta-Compilation Methods in the Ada Test Translator Development. GI - 10. Jahrestagung, R.Wilhelm (ed.), Springer-Verlag, Berlin - Heidelberg - New York, 1980, 66-77. Google ScholarDigital Library
- 19 M. Sarjakoski, Space Management for Attributes in the Compiler Writing System HLP (in Finnish). M. Sc. Thesis, Report C-1982-10, Department of Computer Science, University of Helsinki, Feb. 1982.Google Scholar
Index Terms
- Compiler construction using attribute grammars
Recommendations
Compiler construction using attribute grammars
SIGPLAN '82: Proceedings of the 1982 SIGPLAN symposium on Compiler constructionThe adequacy of attribute grammars as a compiler writing tool is studied on the basis of the experiences on attribute grammars for Pascal and a subset of Euclid. A qualitative assessment of the grammars shows that the compiler oriented view in the ...
Implementation of a Modelica compiler using JastAdd attribute grammars
We have implemented a compiler for key parts of Modelica, an object-oriented language supporting equation-based modeling and simulation of complex physical systems. The compiler is extensible, to support experiments with emerging tools for physical ...
Comments