TL;DR
This paper tackles the challenge of integrating new SMT solvers into the Isabelle/HOL proof assistant by focusing on a standardized proof certificate format called Alethe. They successfully extended the cvc5 solver to produce Alethe proofs and significantly refactored Isabelle's proof reconstruction capabilities, making Isabelle a more robust independent checker for SMT problems.
What Problem Does This Paper Address?
Interactive theorem provers (ITPs) like Isabelle/HOL offer high assurance but require users to construct complex, machine-checkable proofs. To ease this burden, ITPs integrate external automatic theorem provers (ATPs), including SMT solvers. When an ATP proves a goal, it must provide a proof certificate that Isabelle can reconstruct to verify the proof internally. The challenge lies in integrating new SMT solvers: either Isabelle needs to support each solver's unique proof format (difficult and requires deep Isabelle expertise) or the solver needs to output a format Isabelle already understands. Previously, Isabelle supported veriT's Alethe format and a coarser format from z3. This paper addresses the need to integrate modern, powerful SMT solvers like cvc5 into Isabelle's proof reconstruction pipeline, aiming for a more automated and reliable proof checking process.
Methods
The core of this work involves two main efforts:
- Extending cvc5 for Alethe Proofs: The authors modified the cvc5 SMT solver to generate proof certificates in the Alethe format. This involved translating cvc5's internal proof calculus (CPC) to Alethe, which presented challenges due to differences in rule expressiveness and structure. They developed translation schemas and, in some cases, extended the Alethe standard itself with new rules to accommodate cvc5's capabilities.
- Refactoring Isabelle's Proof Reconstruction: The existing Isabelle implementation for reconstructing Alethe proofs was found to be monolithic and difficult to maintain. The authors significantly refactored this code to improve modularity and support the full Alethe standard. This included addressing issues with rule coverage, documentation ambiguities, and over-specialization to veriT's output. They also developed a toolkit to aid debugging and analysis of the reconstruction process.
Datasets
The paper evaluates their work using benchmarks derived from Isabelle's Archive of Formal Proofs. These benchmarks are described as having a different structural profile than typical SMT-LIB benchmarks, often featuring more natural number encodings and less nested conjunctions. They also used a set of SMT-LIB benchmarks.
Key Insights and Ideas
- Alethe as a Unifying Format: The paper strongly advocates for Alethe as a viable, generic proof format for SMT solvers, reducing the burden on ITP developers.
- The Cost of Integration: While the goal was to leverage existing Isabelle infrastructure for Alethe, the authors discovered significant practical challenges in making it work seamlessly with a new solver like cvc5, requiring substantial refactoring.
- Modularity is Key: The refactoring of Isabelle's reconstruction code highlights the importance of modular design for maintainability and extensibility in complex proof assistants.
- Isabelle as an Independent SMT Checker: The developed
check_smttool allows Isabelle to act as a trusted proof checker for SMT problems and their Alethe certificates, independent of the original solver. - Fine-grained Rules and Automation: Supporting fine-grained proof rules, especially term rewriting rules, can be automated using DSLs like RARE and Isabelle lemmas, reducing manual effort.
Key Results
- Successful Integration: cvc5 can now produce Alethe proofs that are successfully reconstructed in Isabelle/HOL.
- Improved Reconstruction: The refactored Isabelle code supports a wider range of Alethe rules and is more robust.
- Performance: The time overhead for cvc5 to generate Alethe proofs is minimal compared to its native format.
- Solver Comparison: cvc5 is shown to be significantly more efficient than veriT at solving benchmarks and constructing proofs, though its proofs are larger.
- Sledgehammer Enhancement: Integrating cvc5 as a backend for Isabelle's Sledgehammer tool improves its ability to solve goals, particularly for problems originating from Isabelle.
- Debugging Tools: The developed toolkit aids in debugging and analyzing the proof reconstruction pipeline.
Limitations and Future Work
- Alethe Incompatibilities: A rare case exists where CPC proof steps introducing fresh terms without proper justification cannot be directly translated to Alethe, resulting in "holes" in the proof. Finding a long-term solution for this is an ongoing challenge.
- Performance Tuning: While cvc5's Alethe proofs are larger and take longer to reconstruct than veriT's, this is attributed to the translation process and the fact that Isabelle's reconstruction code is optimized for veriT. Further optimization is expected to improve cvc5's performance.
- Theory Support: cvc5 supports more theories (e.g., bit-vectors, strings, regular expressions) than Alethe currently does. Extending Alethe and Isabelle's reconstruction to these theories is a promising future direction.
- Isabelle Strategies: The current strategies for cvc5 in Isabelle are based on SMT-COMP configurations, which differ from Isabelle-generated problems. Exploring strategies tailored to Isabelle benchmarks is suggested.
- Proof Compression: Isabelle's compression of certain proof elements (like subproofs for renaming variables) benefits veriT more. Investigating optimizations for cvc5's performance in this regard is also a future direction.
Summary updated