Repository navigation
CBMC: Add CaDiCaL as a second solver for polyvec_matrix_expand(_serial) - #1515
Closed
mkannwischer wants to merge 2 commits into
Closed
mkannwischer wants to merge 2 commits into
mkannwischer wants to merge 2 commits into
Conversation
Contributor
CBMC Results (ML-DSA-44, REDUCE-RAM)
Full Results (435 configurations)
|
Contributor
CBMC Results (ML-DSA-44)
Full Results (435 configurations)
|
Contributor
CBMC Results (ML-DSA-65, REDUCE-RAM)
Full Results (435 configurations)
|
Contributor
CBMC Results (ML-DSA-65)
Full Results (435 configurations)
|
Contributor
CBMC Results (ML-DSA-87, REDUCE-RAM)
Full Results (435 configurations)
|
mkannwischer
marked this pull request as ready for review
October 30, 2026 11:28
Contributor
CBMC Results (ML-DSA-87)
Full Results (435 configurations)
|
mkannwischer
force-pushed
the
cbmc-matrix-expand-unroll
branch
from
October 30, 2026 14:07
f498524 to
2f76958
Compare
mkannwischer
marked this pull request as draft
October 31, 2026 02:04
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>
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>
mkannwischer
force-pushed
the
cbmc-matrix-expand-unroll
branch
from
November 3, 2026 05:14
2f76958 to
95244a5
Compare
Contributor
Author
|
I've included this in #1521. |
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.
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. The z3 configurations and the code are unchanged.
Add cadical as a second solver for polyvec_matrix_expand and polyvec_matrix_expand_serial.