Skip to main content

An OPTRAN-generated front-end for Ada

  • Compiler Construction
  • Conference paper
  • First Online:
Attribute Grammars and their Applications

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 461))

  • 144 Accesses

Abstract

Ada is a high-level imperative programming language with complex static semantics. In this paper we present a compiler front-end that translates Ada programs into DIANA trees — a standard intermediate form for Ada. In order to avoid the difficulties that arise from the ambiguous Ada syntax we designed a transformation system that maps the initial program tree into a more specific one. Semantic checks like overload resolution, type checking etc. are then performed on that tree.

The OPTRAN system developed at the Universitaet des Saarlandes was used to specify and implement the Ada front-end. Both the analysis of static semantics and the transformation of the initial program tree are described using the OPTRAN language which combines attributed tree grammars with sets of so-called transformation rules. The Ada project was a test case for the OPTRAN generator.

In this paper we give a detailed view on the Ada front-end and summarize the experience gained in specifying and implementing it.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Reference Manual for the Ada Programming Language, ANSI / MIL-STD 1815 A, 1983

    Google Scholar 

  2. Bach, I. Unorthogonalities in the identification Rules in Ada, in ACM Ada Letters, Vol IV, March 1984

    Google Scholar 

  3. Baker, T.P. A One-Pass Algorithm for Overload Resolution in Ada, in ACM Transactions on Programming Languages and Systems, Vol. 4, No 4, October 1982, pp. 601–614

    Article  Google Scholar 

  4. Cormack, G.V. An Algorithm for the Selection of Overloaded Functions in Ada, in ACM Sigplan Notices 16, February 1981, pp. 48–52

    Google Scholar 

  5. Drossopoulou, S., Uhl, J., Persch, G., Goos, G., Dausmann, M., Winterstein, G. An Attribute Grammar for Ada, in ACM Sigplan Notices 17, June 1982

    Google Scholar 

  6. Farrow, R., Stanculescu, A. A Compiler for VHDL Based on Attribute Grammar Methodology, in ACM Sigplan Notices 24, July 1989

    Google Scholar 

  7. Greim, M., Pistorius, St., Solsbacher, M. and Weisgerber, B., POPSY and OPTRAN-Manual, in ESPRIT: PROSPECTRA-Project Report, S.1.6-R-3.0, Technical Report No. A 08/86, FB 14 — Informatik, Universitaet des Saarlandes, Saarbruecken, 1986.

    Google Scholar 

  8. Ganzinger, H., Ripken, K. Operator Identification in Ada: Formal Specification, Complexity, and Concrete Implementation, in ACM Sigplan Notices 15, February 1980, pp. 30–42

    Google Scholar 

  9. Goos, G. Wulf, W.A., Evans Jr., E., Butler, K.J. (Edit.) DIANA An Intermediate Language for Ada, Springer Verlag, Berlin 1983

    Google Scholar 

  10. Graham, S.L., Kessler, P.B., McKusick, M.K., gprof: A Call Graph Execution Profiler, in Proceedings of the SIGPLAN '82 Symposium on Compiler Construction, ACM Sigplan Notices, Vol. 17, No. 6, June 1982, pp. 120–126.

    Google Scholar 

  11. Keller, P., Spezifikation und Implementierung eines Ada-Front-Ends mittels Uebersetzer-erzeugender Systeme, Teil I: Deklarations-und Nameclass-analyse, Diploma Thesis (in german), FB 14 — Informatik, Universitaet des Saarlandes, Saarbruecken, 1990.

    Google Scholar 

  12. Lipps, P., Komplexe Attribute — Mechanismen zur Verwaltung und Berechnung in einem baumtransformierenden System, Diploma Thesis (in german), FB 14 — Informatik, Universitaet des Saarlandes, Saarbruecken, 1986.

    Google Scholar 

  13. Lipps, P., Moencke, U., Wilhelm, R., OPTRAN — A Language/System for the Specification of Program Transformations: System Overview and Experiences, in Lecture Notes in Computer Science, Springer, October 1988, pp. 10–14.

    Google Scholar 

  14. Maas, T., Spezifikation und Implementierung eines Ada-Front-Ends mittels Uebersetzer-erzeugender Systeme, Tell II: Aufloesung der Ueberladung und Erzeugung der DIANA-Form, Diploma Thesis (in german), FB 14 — Informatik, Universitaet des Saarlandes, Saarbruecken, 1988.

    Google Scholar 

  15. Moencke, U., Grammar Flow Analysis, in ESPRIT: PROSPECTRA-Project Report S.1.3-R-2.1, FB 14 — Informatik, Universitaet des Saarlandes, Saarbruecken, 1986.

    Google Scholar 

  16. Moencke, U., Production Local Attributes, in ESPRIT: PROSPECTRA-Project Study Notes S.1.3-SN-3.0, FB 14 — Informatik, Universitaet des Saarlandes, Saarbruecken, 1986.

    Google Scholar 

  17. Persch, G., Winterstein, G., Dausmann, M., Drossopoulou, S. Overloading in Preliminary Ada, in ACM Sigplan Notices 15, November 1980, pp. 47–56

    Google Scholar 

  18. Weisgerber B., Attributierte Transformationsgrammtiken: Die Baumanalyse und Untersuchungen zu Transformationsstrategien, Diploma Thesis (in german), FB 14 — Informatik, Universitaet des Saarlandes, Saarbruecken, 1983.

    Google Scholar 

  19. Wilhelm, R., A Modified Tree-To-Tree Correction Problem, in Information Processing Letters 12(3), 1981, pp. 127–132.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

P. Deransart M. Jourdan

Rights and permissions

Reprints and permissions

Copyright information

© 1990 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Keller, P., Maas, T. (1990). An OPTRAN-generated front-end for Ada. In: Deransart, P., Jourdan, M. (eds) Attribute Grammars and their Applications. Lecture Notes in Computer Science, vol 461. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-53101-7_19

Download citation

  • DOI: https://doi.org/10.1007/3-540-53101-7_19

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-53101-2

  • Online ISBN: 978-3-540-46666-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics