Skip to content

Compiling with the Sequent Calculus

Sep 2026 · ACM Transactions on Programming Languages and Systems · 0 citations · 17 references

TL;DR

This work is a continuation, and generalization, of Andrew Appel's landmark work on “Compiling with Continuations”, but instead of natural-deduction-based languages like the lambda calculus, it uses sequent-calculus-inspired languages throughout all intermediate stages.

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”.

View source

Similar papers

#artificial intelligence Preprint Sep 2026

Djinnlang: Higher-Level Programming by Unambiguous Specification with an LLM in the Compiler

Programmers write formal specifications, and LLMs implement them, proving that each implementation matches its spec. Taken to its extreme, this makes specification languages the new programming languages. We argue that an unambiguity constraint is key: in addition to proving that its implementation satisfies the specif...

Simon Henniger, Stephen Chong, Nada Amin · 0 citations
Preprint Sep 2026

Multi-language Program Logics

Real-world programs are rarely written in a single language: For example, C programs call assembly routines, and high-level languages like OCaml link with low-level C libraries. Yet program logics---one of the most successful techniques for modular program verification---almost exclusively target single-language progra...

Alexander Loitzl, Niklas Mück, Michael Sammler · 0 citations
Preprint Sep 2026

CPL: A Compact C-like Systems Language with Explicit Low-Level Control

This paper presents Cordell Programming Language (CPL), a compact C-like systems language that retains C's direct access to memory, layout, and machine interfaces while experimenting with a smaller grammar and selected conveniences from newer languages. Also this paper studies whether C-like are more convenient to use...

N. Fot, A. Vinarsky · 0 citations
Preprint Sep 2026

Where the LLM Ends and Reliable Decisions Begin

Systems that turn natural-language descriptions of optimization problems into solver-ready code generally use a language model at every stage, including the final translation from a mathematical formulation into executable model-building code. We propose the ANVIL compiler architecture, where we separate these concerns...

Priyadarshan Patil, A. Basu, Vikas Reddy et al. · 0 citations
Preprint Sep 2026

A monadic interpreter and type-and-effect checker

We present a concrete implementation in Haskell of a monadic framework that includes both a small-step interpreter and a type-and-effect checker for the corresponding language. Our approach separates the language syntax from the semantics of its effects. This design allows the interpreter to remain parametric over the...

Stefano Raviola, Paola Giannini, Francesco Dagnino · 0 citations
#small language model Book Open access Oct 2026

The Choose-Your-Own-Adventure Calculus

In many programming systems, the user can interactively construct a program by repeatedly triggering a completion mechanism and choosing one of the offered options. This is the case with code editors for object-oriented languages (choosing a member), data exploration environments (choosing a transformation), but also w...

T. Petříček, J. Verter, Mikolas Fromm · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.