Compiler

This chapter presents a first application of programming language semantics: proving compiler correctness. To this end, we will define a small machine language based on a simple stack machine. Stack machines are common lowlevel intermediate languages; the Java Virtual Machine is one example. We then...

Full description

Saved in:
Bibliographic Details
Published inConcrete Semantics pp. 95 - 114
Main Authors Klein, Gerwin, Nipkow, Tobias
Format Book Chapter
LanguageEnglish
Published Switzerland Springer International Publishing AG 2014
Springer International Publishing
Subjects
Online AccessGet full text
ISBN3319105418
9783319105413
DOI10.1007/978-3-319-10542-0_8

Cover

More Information
Summary:This chapter presents a first application of programming language semantics: proving compiler correctness. To this end, we will define a small machine language based on a simple stack machine. Stack machines are common lowlevel intermediate languages; the Java Virtual Machine is one example. We then write a compiler from IMP to this language and prove that the compiled program has the same semantics as the source program. The compiler will perform a very simple standard optimization for boolean expressions, but is otherwise non-optimizing.
ISBN:3319105418
9783319105413
DOI:10.1007/978-3-319-10542-0_8