summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndres Noetzli <noetzli@stanford.edu>2019-05-15 17:38:04 +0000
committerAina Niemetz <aina.niemetz@gmail.com>2019-05-15 10:38:04 -0700
commitf2d113cf3cbb0f4966a7c909b9cd2c14aa753eb1 (patch)
treedf20d8af54d7d7d33d5ab41e7f2401c51a10d2dc /test
parentbc550fa115401256616042ccb7a559ec252e319b (diff)
Fix model of Boolean vars with eager bit-blaster (#2998)
When bit-blasting eagerly, we were not assigning values to the Boolean variables in the `TheoryModel`. With eager bit-blasting, the BV SAT solver gets all (converted) terms, including the Boolean ones, so `EagerBitblaster::collectModelInfo()` is responsible for assigning values to Boolean variables. However, it has only been assigning values to bit-vector variables, which lead to wrong models. This commit fixes the issue by asking the `CnfStream` for the Boolean variables, querying the SAT solver for their value, and assigning them in the `TheoryModel`.
Diffstat (limited to 'test')
-rw-r--r--test/regress/CMakeLists.txt1
-rw-r--r--test/regress/regress0/bv/bool-model.smt27
2 files changed, 8 insertions, 0 deletions
diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt
index 307906dc3..c3f2bc866 100644
--- a/test/regress/CMakeLists.txt
+++ b/test/regress/CMakeLists.txt
@@ -159,6 +159,7 @@ set(regress_0_tests
regress0/bv/ackermann2.smt2
regress0/bv/ackermann3.smt2
regress0/bv/ackermann4.smt2
+ regress0/bv/bool-model.smt2
regress0/bv/bool-to-bv-all.smt2
regress0/bv/bool-to-bv-ite.smt2
regress0/bv/bug260a.smt
diff --git a/test/regress/regress0/bv/bool-model.smt2 b/test/regress/regress0/bv/bool-model.smt2
new file mode 100644
index 000000000..30531418c
--- /dev/null
+++ b/test/regress/regress0/bv/bool-model.smt2
@@ -0,0 +1,7 @@
+; COMMAND-LINE: --bitblast=eager
+(set-info :status sat)
+(set-logic QF_BV)
+(declare-fun x () Bool)
+(declare-fun y () Bool)
+(assert (xor y x))
+(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback