Proof-Producing Translation of Functional Programs into a Time \& Space Reasonable Model
Kevin Kappelmann, Fabian Huch, Lukas Stevens, Mohammad Abdulaziz
TL;DR
The work tackles the challenge of formalising and verifying algorithms within a computation model that is both time- and space-efficient from a complexity-theoretic perspective. It introduces a semi-automated pipeline that starts from tail-recursive, first-order functions in a subset of Isabelle/HOL, translates them into a verified IMP-based language $ ext{$IMP^{ m TC}$}$, and then progressively compiles to a highly space-efficient final model $ ext{$IMP^{-}$}$ via a chain of verified steps, with linear blow-up at each stage. A key novelty is the certified synthesis and automated equivalence proofs between the HOL inputs and the generated imperative programs, enabling formal verification of complexity-theoretic properties for practical algorithms (e.g., maps, folds, bisection, and reductions). The framework lays groundwork for formalising major theorems in complexity theory (e.g., Cook-Levin) by providing a controlled, verifiable path from high-level functional specifications to bounded, bit-level computations.
Abstract
We present a semi-automated framework to construct and reason about programs in a deeply-embedded while-language. The while-language we consider is a simple computation model that can simulate (and be simulated by) Turing Machines with a quadratic time and constant space blow-up. Our framework derives while-programs from functional programs written in a subset of Isabelle/HOL, namely tail-recursive functions with first-order arguments and algebraic datatypes. As far as we are aware, it is the first framework targeting a computation model that is reasonable in time and space from a complexity-theoretic perspective.
