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.
Users
Please
log in to take part in the discussion (add own reviews or comments).