Efficient CHC Solving with Symbolic Reasoning and Inductive Learning
At SAIV, we introduce a novel framework for solving Constrained Horn Clauses (CHCs)—a foundational formalism in program verification. Our approach, Chronosymbolic Learning, rethinks CHC solving by synergizing symbolic reasoning with machine learning approaches. Let’s walk through what this means, and why it matters.
CHCs are logical formulas—fragments of first-order logic (FOL)—that underpin many program verification tasks (but not limited to). Crucially, programs can be automatically transformed into CHCs, reducing verification to a constraint-solving problem. CHCs elegantly capture constructs like loop invariants (corresponding to CHCs’ solution interpretation of predicates), making them a fundamental tool for formal reasoning.
CHC solvers today often fall into two camps:
Each has complementary strengths and limitations.
Chronosymbolic Learning provides a modular framework where black-box and white-box methods cooperate. We identify and formalize key concepts like samples, zones, and counterexamples (definition and examples see slides, page 13-18), and show how they can interact seamlessly. The result: a solver pipeline that is both data-aware and logically grounded.
Zone & Partition Proposal
Learner and reasoner propose new zones and partitions from current zones and samples.
Hypothesis Generation
Construct a hypothesis (see Table 1) based on proposed zones and samples.
Satisfiability Check
Global Consistency Check
Use samples and zones to check UNSAT for the CHC system (cf. Lemmas 5, 6, 11).
Sampling
Generate additional samples from current zones.
Termination
If all CHCs are SAT, return the solution interpretation (loop invariant).
We provide a minimal, proof-of-concept instance of our framework and conduct a thorough evaluation to validate its promise. Our findings show that this hybrid design can offer practical advantages in efficiency of CHC solving.
Everything is built from scratch and fully pythonic! 🔗 -> Artifact available here
Takeaway: Chronosymbolic Learning bridges symbolic rigor and learning flexibility—reshaping how we verify programs.