Skip to content

Commit 540e02e

Browse files
committed
Use custom Z3 switch in proof of this function.
1. Adds Z3 wrapper z3_no_bv_extract that adds the rewriter.bv_le2extract=false option when invoking Z3. See Z3 Issue 7991 for recommendation to use this. 2. Updates Makefile for this function to use that wrapper. Signed-off-by: Rod Chapman <[email protected]>
1 parent 1bd54cf commit 540e02e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

proofs/cbmc/attempt_signature_generation/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ USE_DYNAMIC_FRAMES=1
5050

5151
# Disable any setting of EXTERNAL_SAT_SOLVER, and choose SMT backend instead
5252
EXTERNAL_SAT_SOLVER=
53-
CBMCFLAGS=--smt2
53+
CBMCFLAGS=--external-smt2-solver $(PROOF_ROOT)/lib/z3_no_bv_extract --z3
5454
CBMCFLAGS += --slice-formula
5555
CBMCFLAGS += --no-array-field-sensitivity
5656

proofs/cbmc/lib/z3_no_bv_extract

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
# Copyright (c) The mlkem-native project authors
3+
# SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
4+
5+
# Disable re-writing of bit-vector expressions within quantifiers.
6+
# Such re-writing can cause quantifier e-matching to fail in complex cases.
7+
z3 rewriter.bv_le2extract=false "$@"

0 commit comments

Comments
 (0)