A Multi-Stage Proof Logging Framework to Certify the Correctness of CP Solvers

Maarten Flippo, Konstantin Sidorov, Imko Marijnissen, Jeff Smits, Emir DemirovicCP 2024 · OpenReview

TL;DR

This paper introduces a novel three-stage framework for generating and verifying proofs of correctness for Constraint Programming (CP) solvers. By separating proof generation into scaffolding, processing, and verification, they significantly reduce the runtime overhead of proof logging to under 10%, making it practical for mainstream adoption. This approach also dramatically shrinks proof sizes, leading to faster verification.

What Problem Does This Paper Address?

Constraint Programming (CP) solvers are powerful tools for tackling complex combinatorial problems. While verifying a found solution is straightforward, trusting claims of unsatisfiability or optimality from a solver is challenging. This is due to the inherent complexity of solvers, which can contain bugs. Proof logging aims to address this by having solvers generate verifiable proofs. However, existing proof logging methods for CP solvers incur prohibitively high performance overheads (significant slowdowns and massive proof file sizes), hindering their practical use. This paper tackles the problem of making proof logging efficient and scalable for CP solvers.

Methods

The authors propose a three-stage framework:

  1. Scaffolding: During the solving process, the CP solver generates a "proof scaffold." This is a minimal log of learned clauses (nogoods) that are essential for proving unsatisfiability. This stage is designed to have a very low runtime overhead (under 10%).
  2. Processing: A separate "proof processor" takes the scaffold and performs two key operations:
  3. Trimming: It removes redundant nogoods from the scaffold that are not necessary for the final proof.
  4. Inference Introduction: It expands the trimmed scaffold by adding only the necessary inference steps (propagations) to construct a complete CP proof. This stage is designed to be computationally inexpensive.
  5. Verification: The generated full CP proof is then checked by an external proof checker. The framework is agnostic to the specific verification approach used.

The paper also introduces a novel CP proof format that uses CP terminology and is compatible with various verification methods.

Datasets

The evaluation uses a large set of over 4000 instances from the MiniZinc benchmark repository. These are described as realistic problems, many of which have been used in previous competitions. Specific subsets were used for different experiments, including RCPSP, 2DPacking, and Market Split problems.

Key Insights and Ideas

  • Decoupling Proof Generation: The core idea is to separate the computationally intensive parts of proof generation (like extensive logging) from the actual solving process. The solver only needs to produce a "sketch" (scaffold), and a dedicated processor handles the heavy lifting of constructing the full proof.
  • Trimming is Crucial: The proof processor's ability to trim unnecessary nogoods from the scaffold is vital. This significantly reduces the size of the final proof, which is a major bottleneck in existing approaches.
  • Proof Format Agnosticism: The proposed CP proof format is designed to be flexible and independent of the solver's internal representation, allowing for compatibility with various verification tools.
  • Efficiency Gains: By focusing on logging only essential information during solving and then processing it, the framework achieves a dramatic reduction in runtime overhead and proof size compared to previous methods.

Key Results

  • Runtime Overhead: The scaffolding stage (proof logging during solving) incurs an average overhead of less than 10% of the total runtime. This is a significant improvement over previous approaches that reported slowdowns of orders of magnitude.
  • Proof Size Reduction: The proof processing stage (trimming and inference introduction) can reduce the number of nogoods in the proof by 20-90%.
  • Verification Time: While not the primary focus, the results suggest that proof checking can be very efficient, especially for optimization problems where many intermediate steps might be pruned.
  • Scalability: The framework is demonstrated to work on a large number of realistic benchmarks, showing its potential for practical application.

Limitations and Future Work

  • Solver Support: The current implementation supports a subset of FlatZinc primitives and the cumulative global constraint. Expanding support to more constraints and other formalisms like XCSP is a key area for future work.
  • Verification Tool: While the framework is agnostic to the verification approach, the paper uses VeriPB for evaluation. Developing a formally verified CP proof checker specifically for this format could further reduce end-to-end overhead.
  • Optimization Problems: For optimization problems, the paper notes that while trimming is effective, the proof checking time can still be significant compared to solving time, especially for instances where the solver performs extensive search.
  • Solver Developer Effort: While the framework aims to minimize the burden on solver developers, enabling scaffolding might still require some modifications. Future work could explore further reducing this barrier.

Summary updated

Abstract

Proof logging is used to increase trust in the optimality and unsatisfiability claims of solvers. However, to this date, no constraint programming solver can practically produce proofs without significantly impacting performance, which hinders mainstream adoption. We address this issue by introducing a novel proof generation framework, together with a CP proof format and proof checker. Our approach is to divide the proof generation into three steps. At runtime, we require the CP solver to only produce a proof sketch, which we call a scaffold. After the solving is done, our proof processor trims and expands the scaffold into a full CP proof, which is subsequently verified. Our framework is agnostic to the solver and the verification approach. Through MiniZinc benchmarks, we demonstrate that with our framework, the overhead of logging during solving is often less than 10%, significantly lower than other approaches, and that our proof processing step can reduce the overall size of the proof by orders of magnitude and by extension the proof checking time. Our results demonstrate that proof logging has the potential to become an integral part of the CP community.
BibTeX
@inproceedings{flippo2024multi,
  author = {Maarten Flippo and Konstantin Sidorov and Imko Marijnissen and Jeff Smits and Emir Demirovic},
  title = {{A Multi-Stage Proof Logging Framework to Certify the Correctness of CP Solvers}},
  booktitle = {CP},
  year = {2024},
  url = {https://openreview.net/forum?id=9pNKIZpIys},
}
Figure