Solving constrained Horn clauses modulo algebraic data types and recursive functions
Hari Govind V. K., Sharon Shoham, Arie Gurfinkel
摘要
This work addresses the problem of verifying imperative programs that manipulate data structures, e.g., Rust programs. Data structures are usually modeled by Algebraic Data Types (ADTs) in verification conditions. Inductive invariants of such programs often require recursively defined functions (RDFs) to represent abstractions of data structures. From the logic perspective, this reduces to solving Constrained Horn Clauses (CHCs) modulo both ADT and RDF. The underlying logic with RDFs is undecidable. Thus, even verifying a candidate inductive invariant is undecidable. Similarly, IC3-based algorithms for solving CHCs lose their progress guarantee: they may not find counterexamples when the program is unsafe. We propose a novel IC3-inspired algorithm Racer for solving CHCs modulo ADT and RDF (i.e., automatically synthesizing inductive invariants, as opposed to only verifying them as is done in deductive verification). Racer ensures progress despite the undecidability of the underlying theory, and is guaranteed to terminate with a counterexample for unsafe programs. It works with a general class of RDFs over ADTs called catamorphisms. The key idea is to represent catamorphisms as both CHCs, via relationification , and RDFs, using novel abstractions . Encoding catamorphisms as CHCs allows learning inductive properties of catamorphisms, as well as preserving unsatisfiabilty of the original CHCs despite the use of RDF abstractions, whereas encoding catamorphisms as RDFs allows unfolding the recursive definition, and relying on it in solutions. Abstractions ensure that the underlying theory remains decidable. We implement our approach in Z3 and show that it works well in practice.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper9
- RustHornBelt: a semantic foundation for functional verification of Rust programs with unsafe codeYusuke Matsushita, Xavier Denis, Jacques-Henri Jourdan, Derek DreyerPLDI 2022 · 被引用 44 次
- Model-guided synthesis of inductive lemmas for FOL with least fixpointsAdithya Murali, Lucas Peña, Eion Blanchard, Christof Löding 等OOPSLA 2022 · 被引用 11 次
- Automatic Program Instrumentation for Automatic VerificationJesper Amilon, Zafer Esen, Dilian Gurov, Christian Lidström 等CAV 2023 · 被引用 7 次
- Superfusion: Eliminating Intermediate Data Structures via Inductive SynthesisRuyi Ji, Yuwei Zhao, Nadia Polikarpova, Yingfei Xiong 等PLDI 2024 · 被引用 4 次
- Proving Functional Program Equivalence via Directed Lemma SynthesisYican Sun, Ruyi Ji, Jian Fang, Xuanlin Jiang 等FM 2024 · 被引用 2 次
它引用的顶会 Paper1
相关 Paper
- Thrust: A Prophecy-Based Refinement Type System for RustHiromi Ogawa, Taro Sekiyama, Hiroshi UnnoPLDI 2025
- Solvable Tuple Patterns and Their Applications to Program VerificationNaoki Kobayashi, Ryosuke Sato, Ayumi Shinohara, Ryo YoshinakaPLDI 2026
- Data-Driven Verification of Procedural Programs with Integer ArraysAhmed Bouajjani, Wael-Amine Boutglay, Peter HabermehlCAV 2025
- Rust yDL: A Program Logic for RustDaniel Drodt, Reiner HähnleFM 2026
- Verifying Tree-Manipulating Programs via CHCsMarco Faella, Gennaro ParlatoCAV 2025 · 被引用 1 次
