On the Construction of Correct Compiler Back-Ends: An ASM-Approach

Existing works on the construction of correct compilers have at least one of the following drawbacks: (i) correct compilers do not compile into machine code of existing processors. Instead they compile into programs of an abstract machine which ignores limitations and properties of real-life processors. (ii) the code generated by correct compilers is orders of magnitudes slower than the code generated by unveri ed compilers. (iii) the considered source language is much less complex than real-life programming languages. This paper focuses on the construction of correct compiler backends which generate machine-code for real-life processors from realistic intermediate languages. Our main results are the following: (i) We present a proof approach based on abstract state machines for bottom-up rewriting system speci cations (BURS) for back-end generators. A signi cant part of this proof can be parametrized with the intermediate and machine language. (ii) The performance of the code constructed by our approach is in the same order of magnitude as the code generated by non-optimizing unveri ed C-compilers.

[1]  Helmut Emmelmann Code Selection by Regularly Controlled Term Rewriting , 1991, Code Generation.

[2]  Peter D. Mosses Action Semantics , 1986, ADT.

[3]  Martin Fränzle,et al.  Provably Correct Compiler Development and Implementation , 1992, CC.

[4]  R. Lathe Phd by thesis , 1988, Nature.

[5]  Manuel Blum,et al.  Designing programs that check their work , 1989, STOC '89.

[6]  Alfonso Pierantonio,et al.  Montages Specifications of Realistic Programming Languages , 1997, J. Univers. Comput. Sci..

[7]  Joost-Pieter Katoen,et al.  Code generation based on formal BURS theory and heuristic search , 1997, Acta Informatica.

[8]  Peter D. Mosses,et al.  Abstract Semantic Algebras , 1982, Formal Description of Programming Concepts.

[9]  Egon Börger,et al.  The WAM - Definition and Compiler Correctness , 1995, Logic Programming: Formal Methods and Practical Applications.

[10]  Deryck Forsyth Brown,et al.  Actress: An Action Semantics Directed Compiler Generator , 1992, CC.

[11]  Todd A. Proebsting BURS automata generation , 1995, TOPL.

[12]  Yuri Gurevich,et al.  The Semantics of the C Programming Language , 1992, CSL.

[13]  Mads Tofte Compiler Generators , 1990, EATCS.

[14]  Egon Börger,et al.  Occam: Specification and Compiler Correctness - Part I: The Primary Model , 1994, PROCOMET.

[15]  Egon Börger,et al.  Correctness of Compiling Occam to Transputer Code , 1996, Comput. J..

[16]  David A. Espinosa Semantic Lego , 1995 .

[17]  Mitchell Wand A semantic prototyping system , 1984, SIGPLAN '84.

[18]  Richard L. Sites,et al.  Alpha Architecture Reference Manual , 1995 .

[19]  Marc A. de Kruijf Compiler Construction , 1996, Lecture Notes in Computer Science.

[20]  Lawrence Charles Paulson A compiler generator for semantic grammars , 1981 .

[21]  Jens Palsberg An automatically generated and provably correct compiler for a subset of Ada , 1992, Proceedings of the 1992 International Conference on Computer Languages.

[22]  Stephan Diehl,et al.  Semantics-directed generation of compilers and abstract machines , 1996 .

[23]  Joost-Pieter Katoen,et al.  Code Generation = A* + BURS , 1996, CC.

[24]  Charles Wallace,et al.  The semantics of the C++ programming language , 1995, Specification and validation methods.