Case Studies In Compiler Correctness Using HOL

Two case studies in mechanized compiler specification correctness using the HOL System are presented. These case studies are the initial part of a larger and more comprehensive project, the purpose of which is to investigate the development of systematic methodologies for verifying the correctness of compiler specifications and implementations. The source language used in the case studies is a sample imperative sequential language. The target machine as abstract, stackbased, and executes tree-structured code. The compiler correctness criterion as expressed via commutative diagrams. In the first case study, the source and target language semantics are direct denotational, and the compiler correctness proof is done by structural induction supplemented by computation induction where necessary. In the second case study, the source and target languages are given a structural operational semantics, and the compiler correctness proof is done by rule induction. Extension of the techniques to more complex source languages and target machines as discussed.