Electronic Proceedings in Theoretical Computer Science (Jun 2019)

Introducing Certified Compilation in Education by a Functional Language Approach

  • Per Lindgren,
  • Marcus Lindner,
  • Nils Fitinghoff

DOI
https://doi.org/10.4204/EPTCS.295.5
Journal volume & issue
Vol. 295, no. Proc. TFPIE 2018
pp. 65 – 78

Abstract

Read online

Classes on compiler technology are commonly found in Computer Science curricula, covering aspects of parsing, semantic analysis, intermediate transformations and target code generation. This paper reports on introducing certified compilation techniques through a functional language approach in an introductory course on Compiler Construction. Targeting students with little or no experience in formal methods, the proof process is highly automated using the Why3 framework. Underlying logic, semantic modelling and proofs are introduced along with exercises and assignments leading up to a formally verified compiler for a simplistic imperative language. This paper covers the motivation, course design, tool selection, and teaching methods, together with evaluations and suggested improvements from the perspectives of both students and teachers.