Back to search

Chalmers University of Technology

Tail Recursion Modulo Cons Optimization in CakeML

Abstract

dc:description.abstract

In this project, the Tail Recursion Modulo Cons (TMC) optimization is implemented in the end-to-end verified CakeML compiler. The optimization makes tail recursive those functions which contain a recursive call nested inside one or more constructors. The TMC transformation is applied in the bytecode-value intermediate language (BVI) and rewrites functions in a way that cannot be done manually in CakeML source code. The syntax and semantics of BVI are extended with three new language constructs, and a new compiler phase is added to rewrite BVI programs using the new constructs. The compiler is implemented and formally verified in the HOL4 interactive theorem prover, and included in the project is a mechanized proof that the transformation produces code that is semantically equivalent to the original.

Degree

thesis:*
Level thesis:degree_level
H
Department dc:contributor.department
Chalmers tekniska högskola / Institutionen för data och informationsteknik
Year dc:date.issued
2026

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Wiese, Ry
Advisor dc:contributor.supervisor
  • Myreen, Magnus
Committee member dc:contributor.committeemember
  • Abel, Andreas

Subjects

dc:subject × 1

Rights

Language dc:language.iso
eng

Identifiers

dc:identifier.*
Dc Identifier Coursecode
DATX05

Chain of custody

source
Harvested from
Chalmers University of Technology
Base URL
odr.chalmers.se/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Wiese, Ry. Tail Recursion Modulo Cons Optimization in CakeML. H thesis, 2026. https://hdl.handle.net/20.500.12380/312264