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...
Saved in:
Published in | Concrete Semantics pp. 95 - 114 |
---|---|
Main Authors | , |
Format | Book Chapter |
Language | English |
Published |
Switzerland
Springer International Publishing AG
2014
Springer International Publishing |
Subjects | |
Online Access | Get full text |
ISBN | 3319105418 9783319105413 |
DOI | 10.1007/978-3-319-10542-0_8 |
Cover
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 |