Skip to content

Commit 3cd6348

Browse files
committed
Enable compact less-than propositional encoding
This was previously disabled as it appeared to degrade performance. New benchmarking, however, suggests considerable performance improvement: When running on various proofs done for AWS open-source projects, this changes the performance as follows (when comparing to diffblue#7021): with CaDiCaL as back-end, the total solver time for the hardest 46 proofs changes from 26779.7 to 24472.6 seconds (2307.1 seconds speed-up); with Minisat the hardest 49 proofs take 18541.2 instead of 28420.4 seconds (9879.2 seconds speed-up). Across these benchmarks, 1.0% of variables and 3.2% of clauses are removed. INCLUDE_REDUNDANT_CLAUSES is not enabled: while this would yield a further speed-up of 1080.4 seconds with CaDiCaL, it slows down Minisat by 4440.6 seconds on the above benchmark set.
1 parent 33f3d13 commit 3cd6348

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

jbmc/regression/jbmc/assume-inputs-non-null/string_assume.desc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
THOROUGH
22
My
33
--function My.stringArg --java-assume-inputs-non-null
44
^EXIT=10$
@@ -10,3 +10,6 @@ My
1010
^warning: ignoring
1111
--
1212
Check that --java-assume-inputs-non-null restricts inputs to non-null strings
13+
14+
The test is marked "THOROUGH" as it requires more memory than may be available
15+
on some GitHub runners.

jbmc/regression/jbmc/exceptions29/test.desc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
THOROUGH
22
test
33
--unwind 10
44
^\[java::test.main:\(\[Ljava/lang/String;\)V\.assertion.1\] line 14 assertion at file test\.java line 14 function java::test.main:\(\[Ljava/lang/String;\)V bytecode-index 21: FAILURE$
@@ -15,3 +15,6 @@ test.main gives the following exception table:
1515
8 22 25 Class java/lang/Exception
1616
0 7 45 Class MyException
1717
8 42 45 Class MyException
18+
19+
The test is marked "THOROUGH" as it requires more memory than may be available
20+
on some GitHub runners.

src/solvers/flattening/bv_utils.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,17 +1198,13 @@ literalt bv_utilst::equal(const bvt &op0, const bvt &op1)
11981198
/// \par parameters: bvts for each input and whether they are signed and whether
11991199
/// a model of < or <= is required.
12001200
/// \return A literalt that models the value of the comparison.
1201+
1202+
#define COMPACT_LT_OR_LE
12011203
/* Some clauses are not needed for correctness but they remove
12021204
models (effectively setting "don't care" bits) and so may be worth
12031205
including.*/
12041206
// #define INCLUDE_REDUNDANT_CLAUSES
12051207

1206-
// Saves space but slows the solver
1207-
// There is a variant that uses the xor as an auxiliary that should improve both
1208-
// #define COMPACT_LT_OR_LE
1209-
1210-
1211-
12121208
literalt bv_utilst::lt_or_le(
12131209
bool or_equal,
12141210
const bvt &bv0,

0 commit comments

Comments
 (0)