Repository navigation
CBMC: Add CaDiCaL as a second solver for all remaining proofs - #1521
Draft
mkannwischer wants to merge 8 commits into
Draft
mkannwischer wants to merge 8 commits into
mkannwischer wants to merge 8 commits into
Conversation
CBMC skolemizes every asserted forall, but the propositional back end expands assumed foralls over their constant range. A bound handed from a callee's ensures to a caller's requires then becomes a symbolic read at a fresh index that the solver has to relate to every expanded instance, which makes the encoding very large for cadical. Patch CBMC 6.11.0 with --no-forall-skolemization, which passes asserted quantifiers to the back end unchanged so that they are expanded like assumed ones. The patch also treats an empty instantiation range as true (forall) or false (exists) instead of leaving the quantifier unconstrained. The flag is off by default. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
Pass --no-forall-skolemization for cadical only. Locally for ML-DSA-87, sign_signature_internal then takes about 560s with cadical. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
Pass --no-forall-skolemization for cadical only. Locally for ML-DSA-87, attempt_signature_generation then takes about 420s with cadical. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
Pass --no-forall-skolemization for cadical only. Locally for ML-DSA-87, compute_pack_t0_t1 then takes about 750s with cadical. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
Pass --no-forall-skolemization for cadical only. Locally for ML-DSA-44, sign_verify_internal then takes about 210s with cadical. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
Pass --no-forall-skolemization for cadical only. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
Contributor
CBMC Results (ML-DSA-44, REDUCE-RAM)
Full Results (440 configurations)
|
Contributor
CBMC Results (ML-DSA-44)
Full Results (440 configurations)
|
Contributor
CBMC Results (ML-DSA-65, REDUCE-RAM)
Full Results (440 configurations)
|
Contributor
CBMC Results (ML-DSA-65)
Full Results (440 configurations)
|
Contributor
CBMC Results (ML-DSA-87, REDUCE-RAM)
Full Results (440 configurations)
|
Contributor
CBMC Results (ML-DSA-87)
Full Results (440 configurations)
|
With the loop contracts, the matrix entries sampled in each iteration are havocked at a symbolic offset into mld_polymat_eager, which makes the propositional encoding very large. For cadical only, fully unroll the sampling loops instead, so that each entry is written at a constant offset. Unwinding assertions check that the bounds cover all parameter sets. Also pass --no-forall-skolemization for cadical. The z3 configurations and the code are unchanged. Add cadical as a second solver for polyvec_matrix_expand and polyvec_matrix_expand_serial. Locally for ML-DSA-87, they take about 30s and 20s with cadical. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
Replace the combined NULL check of the seven allocations by one check per allocation. With the instrumented malloc/free, the combined check made the propositional encoding of the sign_pk_from_sk proof too large for cadical. Locally for ML-DSA-87, the proof now takes about 220s with cadical. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
Contributor
Author
|
Opened a CBMC issue for the issue identified here: diffblue/cbmc#9387 |
This was referenced Nov 3, 2026
This was referenced Nov 5, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Testing a CBMC patch for diffblue/cbmc#9387.