summaryrefslogtreecommitdiff
path: root/test/regress/regress0/bv
diff options
context:
space:
mode:
authoryoni206 <yoni206@users.noreply.github.com>2021-06-30 05:11:56 -0700
committerGitHub <noreply@github.com>2021-06-30 07:11:56 -0500
commit14944f1115fa2ad20afa3873626c2804731aff71 (patch)
treed1daf6cdf25988ae0c5f6b514e32764dbd1fa8eb /test/regress/regress0/bv
parent373b6e1e8e91874afab16416f7acc3839f0027af (diff)
int-to-bv: correct model values (#6811)
the int-to-bv preprocessing pass produced wrong models. This PR fixes this in a similar fashion to other preprocessing passes, by adding a substitution to the preprocessing pass context. This requires moving the main translation function to be a class method, rather than a helper method in an empty namespace. Thanks to @alex-ozdemir for raising this issue and producing a triggering benchmark (added to regressions in this PR).
Diffstat (limited to 'test/regress/regress0/bv')
-rw-r--r--test/regress/regress0/bv/int_to_bv_model.smt28
1 files changed, 8 insertions, 0 deletions
diff --git a/test/regress/regress0/bv/int_to_bv_model.smt2 b/test/regress/regress0/bv/int_to_bv_model.smt2
new file mode 100644
index 000000000..ebe8ab10c
--- /dev/null
+++ b/test/regress/regress0/bv/int_to_bv_model.smt2
@@ -0,0 +1,8 @@
+; COMMAND-LINE: --solve-int-as-bv=9 --check-models
+; EXPECT: sat
+(set-logic QF_NIA)
+(declare-const a Int)
+(declare-const b Int)
+(assert (= (+ (* a 251) a) (+ b (* b 211))))
+(assert (not (= a 0)))
+(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback