Foundational Constraint Solving for Expressive Refinement Typing

📅 2026-07-13
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the limitations of existing SMT-based program verification tools, which suffer from insufficient expressiveness and low solver trustworthiness. To overcome these challenges, the authors propose FLEX—the first end-to-end foundational Constrained Horn Clause (CHC) solver implemented entirely within Lean. FLEX encodes CHCs as propositions verifiable by Lean’s trusted kernel and integrates metaprogramming tactics with Floyd-Hoare semantics to enable composable strategies for verification condition generation and solving. By leveraging Lean’s expressive logic, this approach transcends the representational constraints of SMT solvers and supports correctness proofs for arbitrary functions within Lean’s rich ecosystem. Evaluated on the FLUX benchmark, FLEX automatically solves 95.7% of CHC problems and successfully verifies multiple low-level Rust libraries.
📝 Abstract
SMT-based program verifiers are hamstrung by two problems: expressiveness, because predictable verification restricts to the boundaries of SMT decidability, and trust, because the solver is a large, unverified artifact whose soundness bugs may quietly compromise every tool built on it. We present FLEX, a foundational Constrained Horn Clause (CHC) solver implemented in LEAN, that reduces the trusted base to the kernel alone, and allows using LEAN's entire proof ecosystem to verify low-level systems code, via three contributions. First, FLEX encodes CHCs as plain LEAN propositions where the Horn variables are existentially bound predicates, and shows how to implement CHC solvers as tactics (meta-programs) that compute kernel checkable proofs of the CHC propositions. Second, we show how to implement two verified CHC generators in LEAN: a Floyd-Hoare style generator for an imperative language, and a refinement-type-based generator for a functional calculus, which can be composed with the solving tactics to yield the first end-to-end foundational CHC-based verifiers. Finally, we show how FLEX allows us to leapfrog the expressiveness limitations of SMT by unleashing LEAN's entire ecosystem of proof machinery to prove arbitrary functional correctness properties of various low-level Rust libraries using the FLUX refinement type checker, and demonstrate the viability of FLEX as a trustworthy CHC backend, by showing it automatically discharges 95.7% of the CHCs from FLUX's benchmark suite.
Problem

Research questions and friction points this paper is trying to address.

SMT-based verification
expressiveness
trust
Constrained Horn Clauses
foundational verification
Innovation

Methods, ideas, or system contributions that make the work stand out.

Foundational Verification
Constrained Horn Clauses
Refinement Types
Lean Theorem Prover
SMT Limitations
🔎 Similar Papers
No similar papers found.