arXiv:2610.23771cs.LOOct 2026

Manuscript Offprint

arXiv:2610.23771

LLM-Assisted Bi-Approximate CHC Solving

Baiting Jiang

BAITING JIANG, Tsinghua University, China, jbt24@mails.tsinghua.edu.cn

Constrained Horn clause (CHC) solvers often struggle to discover deep counterexamples whose derivations may require extensive rule unfolding. Although large language models (LLMs) can propose long-range symbolic relations, prior work on formally checked LLM-assisted verification has mainly focused on generating inductive invariants and concrete traces. We exploit this broader capability through Derivation Power Under-approximations (DPUs). Each DPU is a solver-certified under-approximation of the relation induced by a multi-step CHC derivation. An LLM proposes each DPU with symbolic intermediate-state witnesses that enable SMT validation without introducing additional quantifiers. Validated DPUs can be composed and reused soundly. Building on this mechanism, our LLM-assisted framework HornCraft combines invariant generation for over-approximation with DPU generation for under-approximation in CHC solving. On 260 linear and nonlinear integer-arithmetic CHC-COMP benchmarks left unresolved by a 30-minute Spacer run, HornCraft returns certified verdicts for 228 instances. It certifies 42 instances as unsafe, compared with 22 when DPU construction and reuse are disabled.

CCS Concepts: • Theory of computation → Verification by model checking; Logic and verification; Automated reasoning.

Additional Key Words and Phrases: model checking, constrained Horn clauses, large language models

1 Introduction

Constrained Horn clauses (CHCs) provide a general intermediate representation for a wide range of formal verification problems across programming languages and application domains, including tools for C [17, 25, 26], Java [31], Android [10], Rust [39], and Solidity [1, 49]. Many solvers have been developed for the CHC satisfiability problem, including Spacer [36], MuCyc [46], Eldarica [29], Golem [5], and LoAT [22]. A CHC solver can prove query unreachability by finding an inductive interpretation, or prove query reachability by applying CHC rules until a query is reached. Such a finite proof is called a derivation.

For reachable instances, a counterexample derivation may be deep, requiring many rule applications before reaching the query [7, 22]. A solver that reasons one rule application at a time has to traverse the whole derivation, making deep counterexamples hard to find and validate. Besides, a derivation may also branch because one rule application can depend on multiple reachable predecessors. Reasoning across several steps at once can avoid this repeated unfolding. TPA does so by building over-approximate relations for increasingly long transition sequences [7], whereas LoAT learns under-approximate relations [22].

On the other hand, LLM-assisted verification has recently been applied to both proof construction and bug finding. We follow the guess-and-check paradigm in which an LLM proposes candidate artifacts and a formal backend validates them, keeping the LLM outside the trusted reasoning core. Prior work in this paradigm has mainly used LLMs to construct over-approximations of reachable states, especially inductive invariants, for unreachability proofs [20, 32, 42, 44, 50, 51]. On the reachability side, recent approaches produce concrete inputs or execution traces as evidence of reachability [34, 45].

However, LLMs are well suited to proposing long-range symbolic relations that cross many derivation steps. Yet existing guess-and-check interfaces still require a complete trace for solver validation and thus lack a direct way to use this ability.

To bridge this gap, we propose Derivation Power Under-approximation (DPU). A DPU represents a solver-certified subset of feasible multi-step CHC derivations. It can reduce the number of steps needed to represent a deep derivation. To obtain this compression within the guess-and-check paradigm, the LLM proposes candidate DPUs together with symbolic witnesses for their

Baiting Jiang

intermediate states. A solver then validates each proposal through SMT queries without introducing additional quantifiers. Once certified, DPUs can be reused to construct new DPUs and combined to compress longer linear and branching derivations. In this way, DPUs serve as a formally checkable interface between an untrusted generative proposer and a trusted verifier.

We develop HornCraft, an LLM-assisted framework for CHC solving. HornCraft combines LLM-proposed DPU candidates for under-approximating feasible multi-step derivations with LLM-proposed invariant candidates for over-approximating reachable states.

Experimental results show that HornCraft certifies 228 of 260 (88%) linear and nonlinear integer-arithmetic CHC-COMP instances that time out under a 30-minute Spacer run in Z3 4.17 [14]. This includes all 35 instances in the expected-unsafe group and 26 of 40 instances with unknown expected verdicts. On six parameterized CHC families used to study scalability with derivation depth and branching, it solves 30 of 37 instances left unresolved by a 30-minute Spacer run. With DPU, HornCraft certifies 42 Spacer-hard instances as unsafe (vs. 22 without DPU) and solves larger unsafe instances in four nonlinear families.

Our main contributions are as follows:

  1. We introduce witness-carrying DPUs, solver-certified under-approximations of multi-step CHC derivations that connect LLM proposals with solver validation. Symbolic witnesses enable certification without introducing additional quantifiers.

  2. We give a sound calculus for composing and reusing DPU relations over mixed rule applications and branching derivations.

  3. We develop HornCraft, an LLM-assisted framework that combines LLM-proposed DPU and invariant candidates for reachability and unreachability.

References (19)