Compiling with the Sequent Calculus

Compiling with the Sequent Calculus

by Marius Müller, David Binder, Marco Tzschentke, Philipp Schuster, Klaus Ostermann, and Jonathan Immanuel Brachthäuser

In ACM Trans. Program. Lang. Syst., 2026.

Abstract

Compiling a high-level functional programming language to machine code that can be executed efficiently on a modern machine is complicated, since we have to traverse many different levels of abstraction. This is particularly challenging if the language contains some form of control effects and a mix of different evaluation strategies, such as call-by-value data types and call-by-name codata types. In this paper, we tell the complete story, starting from a simple functional programming language with control effects and both data and codata types, and ending up with machine code for standard platforms. What distinguishes our compiler from all other existing compilers for functional programming languages is that, instead of natural-deduction-based languages like the lambda calculus, we use sequent-calculus-inspired languages throughout all intermediate stages. These sequent-calculus-based languages are characterized by the first-class nature of consumers, which represent program contexts. In this sense, we view our work as a continuation, and generalization, of Andrew Appel’s landmark work on “Compiling with Continuations”.

News

Paper in TOPLAS 2026

Our article “Compiling with the Sequent Calculus” has been accepted for publication in the ACM Transactions on Programming Languages and Systems (TOPLAS).

Read more ...