🤖 AI Summary
This work addresses the challenge of simultaneously ensuring verifiability and computational complexity guarantees when translating functional programs into imperative models. We propose the first formally verified translation framework that preserves both time and space complexity bounds. Our method automatically translates tail-recursive functions specified in Isabelle/HOL into a deeply embedded while-language, whose semantics are simulatable by a Turing machine in O(n) time and O(1) space. The translation relies on structural induction, algebraic data type handling, tail-recursion detection, and mechanized equivalence proofs, yielding semi-automated transformations accompanied by machine-checkable certificates. These certificates formally establish functional equivalence and asymptotic complexity bounds. Our key contribution is the first integration—within an interactive theorem prover—of a functional-to-imperative translation mechanism that jointly ensures formal correctness and rigorous asymptotic complexity guarantees.
📝 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 linear 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.