Calculating correct compilers

نویسندگان

  • Patrick Bahr
  • Graham Hutton
چکیده

In this article we present a new approach to the problem of calculating compilers. In particular, we develop a simple but general technique that allows us to derive correct compilers from highlevel semantics by systematic calculation, with all details of the implementation of the compilers falling naturally out of the calculation process. Our approach is based upon the use of standard equational reasoning techniques, and has been applied to calculate compilers for a wide range of language features and their combination, including arithmetic expressions, exceptions, state, various forms of lambda calculi, bounded and unbounded loops, non-determinism, and interrupts. All the calculations in the article have been formalised using the Coq proof assistant, which serves as a convenient interactive tool for developing and verifying the calculations.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

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 ge...

متن کامل

Code Optimization in Compilers using ANN

Today’s compilers have a plethora of optimizations to choose from, and the correct choice of optimizations can have a significant impact. Furthermore, choosing the correct order in which to apply those optimizations has been a long standing problem in compilation research. Traditional compilers typically apply the same set of optimization in a fixed order to all functions in a program, without ...

متن کامل

Constructing Compilers in a persistent environment

Traditionally compilers have been described as consisting of separate modules: the syntax analyser; lexical analyser; code generator etc. However, in practice modern compilers are rarely constructed in this manner. This may be because it is difficult to find the correct levels of abstraction necessary to build a compiler from components without losing efficiency. In this paper a set of modules ...

متن کامل

Verification Tools in the Development of Provably Correct Compilers

The paper presents a practical veriication tool that helps in the development of provably correct compilers. The tool is based on the approach of proving termination of PROLOG-like programs using term-rewriting techniques and a technique of testing whether a given PROLOG program can be soundly executed on PROLOG interpreters without the Occur-check test. The tool has been built on top of the th...

متن کامل

More Advice on Proving a Compiler Correct: Improve a Correct Compiler

As an alternative to the classical approach to the compiler correctness problem where a given compiler is proved correct from scratch, we propose a method for deriving correct compilers from a denotational semantics via a series of reenements. Each such optimization step corresponds to an eeciency improvement in the corresponding compiler. Our technique combines the standard initial algebra sem...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • J. Funct. Program.

دوره 25  شماره 

صفحات  -

تاریخ انتشار 2015