POPL 2023

DimSum: A Decentralized Approach to Multi-language Semantics and Verification


Conditionally accepted, preprint will be shared shortly


Prior work on multi-language program verification has achieved impressive results, including the compositional verification of complex compilers. But the existing approaches to this problem impose a variety of restrictions on the overall structure of multi-language programs (e.g. fixing the source language, fixing the set of involved languages, fixing the memory model, or fixing the semantics of interoperation). In this paper, we explore the problem of how to avoid such global restrictions.

Concretely, we present DimSum: a new, decentralized approach to multi-language semantics and verification, which we have implemented in the Coq proof assistant. Decentralization means that we can define and reason about languages independently from each other (as independent modules communicating via events), but also combine and translate between them when necessary (via a library of combinators).

We apply DimSum to a high-level imperative language REC (with an abstract memory model and function calls), a low-level assembly language ASM (with a concrete memory model, arbitrary jumps, and syscalls), and a mathematical specification language SPEC. We evaluate DimSum on two case studies: an ASM library extending REC with support for pointer comparison, and a coroutine library for REC written in ASM. In both cases, we show how DimSum allows the ASM libraries to be abstracted to REC-level specifications, despite the behavior of the ASM libraries not being syntactically expressible in REC itself. We also verify an optimizing multi-pass compiler from REC to ASM, showing that it is compatible with these ASM libraries.