Unpublished,

More Advice on Proving Compilers Correct: Improve Correct Compilers

.
(September 1994)

Abstract

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 refinements. Each such optimization step corresponds to an efficiency improvement in the corresponding compiler. Our technique combines the standard initial algebra semantics approach with aspects of Action Semantics. Instead of expressing semantic functions as homomorphisms from the initial algebra (syntax) to some semantic domain, they are factored through an algebra of actions. Compilers can then be obtained by viewing semantic functions as translations from the source language to the initial action algebra. We illustrate our method by deriving several compilers for a language of arithmetic expressions. Though simple, this example shows all the steps necessary to deal with more realistic languages.

Tags

Users

  • @dparigot

Comments and Reviews