Abstract

Compiler generation based on formal semantics has received considerable attention in recent years from a number of semanticists. Compiler writers, on the other hand, know relatively little about these efforts. This paper tries to remedy this situation by discussing our experimentation with the Semantics Implementation System (SIS) of Peter Mosses. SIS allows the user to generate a complete compiler from a formal specification of the syntax and semantics of a programming language. In particular, the translator component of a compiler is obtained by directly implementing a denotational semantics. Consequently, a compiler is expressed as a higher order function. A program is compiled by formally applying the compiler to a tree representation of the program and simplifying this application. The experimentation with SIS indicates that compiler generation based on denotational semantics is feasible, though not yet viable. We argue that SIS constitutes an important first step toward the automatic construction of provably correct, complete, and reasonably efficient compilers from formal syntactic and semantic specifications.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call