Abstract
OPTRAN is a batch-oriented system for the generation of compilers that support program transformations. Programs are represented by attributed abstract syntax trees (AAST). The transformation of AAST's is a powerful method to describe problems in compiler writing such as machine-independent optimisations, language-based editors, and source-to-source translations.
The specification language OPTRAN allows for a static and declarative description of tree transformations. Given such a specification, the system will automatically generate the transformation system, mainly consisting of an attribute evaluator and reevaluator, as well as a tree analyzer and transformer.
The paper presents an introduction to the description mechanisms together with an overview of the system, showing the interaction of several generators. The main goal of the system design is the usage of precomputation methods wherever possible. This generative approach is explained. The static view of transformations makes it possible to generate highly efficient transformers but also has its limitations, which we mention.
The system is written in Pascal and generates Pascal programs. Pascal also serves as host language, i.e. semantic rules are specified as Pascal procedures. This complicates the error diagnosis of the runtime system as the semantics of these procedures is not obvious to the generator system. Furthermore it inhibits the recognition of certain properties of the specification like invariance of attribute assignments under non-trivial transformations.
We report practical experiences for some applications, e.g. a compiler for MiniPascal producing M68000 code and a frontend for Ada producing DIANA intermediate descriptions. [Li88] contains an annotated bibliography on OPTRAN.
partially supported by the Deutsche Forschungsgemeinschaft under Project "Manipulation of Attributed Trees" and the Commission of the European Community under Esprit Project Ref. No. 390 (PROSPECTRA)
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Badt, P., P. Raber, and U. Möncke, Attributation Schemata for List-Structured Nodes, ESPRIT: PROSPECTRA Project Report S.1.3-R-1.0, FB 10 — Informatik, Universität des Saarlandes, 1985.
Badt, P., P. Raber, and U. Möncke, Specification of Recursive Patterns, ESPRIT: PROSPECTRA Project Report S.1.6-SN-4.0, FB 10 — Informatik, Universität des Saarlandes, 1986.
Börstler, J., U. Möncke, and R. Wilhelm, Table Compression for Tree Automata, Aachener Informatik Berichte No. 87-12, RWTH Aachen, Fachgruppe Informatik, Aachen, 1987.
Badt, P., OPTRAN — Ein System zur Generierung von Baumtransformatoren: Rekursive Schablonen und Listenkonstrukte, Diploma Thesis (in german), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1986.
Eulenstein, M., POCO — Ein portables System zur Generierung portabler Compiler, Informatik Fachberichte 164,1988.
Farrow, R. and D. Yellin, A Comparison of Storage Optimizations in Automatically-Generated Attribute Evaluators, Acta Informatica 23(4),Springer-Verlag, 1986.
Glasner, I., U. Möncke, and R. Wilhelm, OPTRAN — A Language for the Specification of Program Transformations, pp. 125–142 in Informatik Fachberichte, 7th GI Workshop on Programming Languages and Program Development, Springer-Verlag, 1980.
Giegerich, R., U. Möncke, and R. Wilhelm, Invariance of Approximative Semantics with respect to Program Transformations, pp. 1–10 in 11. GI Fachtagung für Programmiersprachen und Programmentwicklung,Informatik Fachberichte 50,, Springer-Verlag, 1981.
Greim, M., St. Pistorius, M. Solsbacher, and B. Weisgerber, POPSY and OPTRAN-Manual, ESPRIT: PROSPECTRA-Project Report, S.1.6-R-3.0, Technical Report No. A 08/86, FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1986.
Heckmann, R., An efficient ELL(1)-Parser Generator, Acta Informatica 23, pp. 127–148, 1986.
Heckmann, R., Manual for the ELL(2)-Parser Generator and Tree Generator Generator, Technical Report No. A 05/86, FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1986.
Heckmann, R., A Functional Language for the Specification of Complex Tree Transformations, Proceedings of the 2nd European Symposium on Programming (ESOP'88), LNCS 300,, pp. 175–190, Springer-Verlag
Hoover, R., Dynamically Bypassing Copy Rule Chains in Attribute Grammars, ACM Symposium on Principles of Programming Languages, January 1986.
Horsch, G., Source-to-source-Transformationen: Eine Studie des Compiler-Generierenden Systems OPTRAN anhand eines SPL4→C-Compilers, Diploma Thesis (in german), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1988.
Keller, P. and Th. Maas, An OPTRAN generated Ada→DIANA frontend, Technical Report (forthcoming), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1988.
Kennedy, K. and S.K. Warren, Automatic Generation of Efficient Evaluators for Attribute Grammars, Conf. Record of 3rd Symposium on Principles of Programming Languages,, pp. 32–49, 1976.
Keller, P., Spezifikation und Implementierung eines Compilerfrontends für Ada: Deklarations-und Nameclassanalyse, Diploma Thesis (in german), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1988.
Lipps, P., M. Olk, U. Möncke, and R. Wilhelm, Attribute (Re)evaluation in OPTRAN, ESPRIT: PROSPECTRA Project Report S.1.3-R-5.0, FB 10 — Informatik, Universität des Saarlandes, 1987. (to be published in Acta Informatica)
Lipps, P., OPTRAN: A Language/System for the Specification of Program Transformations — Annotated Bibliography, Internal Report, FB 10 — Informatik, Universität des Saarlandes, 1988.
Lipps, P., Komplexe Attribute — Mechanismen zur Verwaltung und Berechnung in einem baumtransformierenden System, Diploma Thesis (in german), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1986.
Möncke, U. and R. Wilhelm, Iterative algorithms on grammar graphs, pp. 177–194 in Proc. 8th Conference on Graphtheoretic Concepts in Computer Science, ed. H.J. Schneider, H. Goettler, Hanser Verlag, München, 1983.
Möncke, U., B. Weisgerber, and R. Wilhelm, How to implement a system for manipulation of attributed trees, pp. 112–127 in Informatik Fachberichte, 8th GI Workshop on Programming Languages and Program Development, Springer-Verlag, Zürich, March 1984.
Möncke, U., B. Weisgerber, and R. Wilhelm, Generative support for transformational programming, pp. 511–527 in ESPRIT: Status Report of Continuing Work, Elsevier Sc., Brussels, 1986.
Möncke, U., Generierung von Systemen zur Transformation attributierter Operatorbäume — Komponenten des Systems und Mechanismen der Generierung, Ph.D. Thesis (in german), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1985.
Möncke, U., Grammar Flow Analysis, ESPRIT: PROSPECTRA-Project Report S.1.3-R-2.1, FB 10 — Informatik, Universität des Saarlandes, 1986. (submitted for publication)
Möncke, U., Production Local Attributes, ESPRIT: PROSPECTRA-Project Study Notes, S.1.3-SN-3.0, FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1986.
Möncke, U., Simulating Automata for Weighted Tree Reductions, ESPRIT: PROSPECTRA-Project Report S.1.6-R-5.1 and Technical Report No. A 10/87, FB 10 — Informatik, Universität des Saarlandes, 1987.
Mass, T., Spezifikation und Implementierung eines Compilerfrontends für Ada: Auflösung der Überladung und Erzeugung von DIANA, Diploma Thesis (in german), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1988.
Olk, M., Generierung eines effizienten Attributschedulers für ein baumtransformierendes System, Diploma Thesis (in german), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1986.
Raber, P., Listenkonstrukte und ihre Attributierung in einem System zur Generierung von Baumtransformatoren, Diploma Thesis (in german), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1986.
Rauber, Th., Registerverteilung und Codeselektion für wechselnde Zielmaschinen, Diploma Thesis (in german), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1986.
Reps, Th., Generating Language-Based Environments, Ph.D. Thesis, Cornell University, 1982.
Schmigalla, M., A. Schütte, and B. Weisgerber, OPTRAN'82-Manual, Internal Report, FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, December 1982.
Thome, W., Ein Konzept zur Bibliotheksverwaltung von Transformationseinheiten und deren Hintereinanderschaltung, Diploma Thesis (in german), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1988.
Tieser, E., Attributauswertung für zyklische Attributierung, Diploma Thesis (in german), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1988.
Tittelbach, H., Effiziente Attributspeicherverwaltung für ein baumtransformierendes System, Diploma Thesis (in german), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1986.
Weisgerber, B., Attributierte Transformationsgrammatiken: Die Baumanalyse und Untersuchungen zu Transformationsstrategien, Diploma Thesis (in german), FB 10 — Informatik, Universität des Saarlandes, Saarbrücken, 1983.
Wilhelm, R., Computation and Use of Data Flow Information in Optimizing Compilers, Acta Informatica 12, pp. 209–225, Springer-Verlag, 1979.
Wilhelm, R., A Modified Tree-To-Tree Correction Problem, Information Processing Letters 12(3), pp. 127–132, North-Holland, 1981.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1989 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lipps, P., Möncke, U., Wilhelm, R. (1989). OPTRAN - A language/system for the specification of program transformations: System overview and experiences. In: Hammer, D. (eds) Compiler Compilers and High Speed Compilation. CCHSC 1988. Lecture Notes in Computer Science, vol 371. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-51364-7_4
Download citation
DOI: https://doi.org/10.1007/3-540-51364-7_4
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-51364-3
Online ISBN: 978-3-540-46200-2
eBook Packages: Springer Book Archive