Skip to content

Commit f65790d

Browse files
author
Remi Delmas
committed
Fix performance regression with z3 via --dfcc-simple-invalid-pointer-model
1 parent d499095 commit f65790d

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

regression/contracts-dfcc/quantifiers-loops-fresh-bound-vars-smt/test.desc renamed to regression/contracts-dfcc/quantifiers-loops-fresh-bound-vars-smt/test_bitwuzla.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE dfcc-only smt-backend broken-cprover-smt-backend
22
main.c
3-
--dfcc main --apply-loop-contracts --enforce-contract foo --malloc-may-fail --malloc-fail-null _ --z3 --slice-formula --no-standard-checks
3+
--dfcc main --apply-loop-contracts --enforce-contract foo --malloc-may-fail --malloc-fail-null _ --bitwuzla --slice-formula --no-standard-checks
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
CORE dfcc-only smt-backend broken-cprover-smt-backend
2+
main.c
3+
--dfcc main --apply-loop-contracts --enforce-contract foo --malloc-may-fail --malloc-fail-null --dfcc-simple-invalid-pointer-model _ --z3 --slice-formula --no-standard-checks
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring
9+
--
10+
Tests support for quantifiers in loop contracts with the SMT backend.
11+
When quantified loop invariants are used, they are inserted three times
12+
in the transformed program (base case assertion, step case assumption,
13+
step case assertion), and each occurrence needs to be rewritten with fresh
14+
symbols for the quantified variables. The SMT solver would with an error
15+
whenever this renaming is not properly done.
16+
When z3 is used, for performance we have to activate the simple invalid pointer
17+
model in the cprover_contracts library.

0 commit comments

Comments
 (0)