summaryrefslogtreecommitdiff
path: root/test/regress/regress0/bv
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2020-09-08 10:33:59 -0700
committerGitHub <noreply@github.com>2020-09-08 10:33:59 -0700
commit7b36dc4ee0f4fa5c1d73b0f648c74b9736a5f626 (patch)
treee8b7631755e92c80536e9a146bbd6c5e53a99787 /test/regress/regress0/bv
parentbe3543ef7e01eb32aab3161fa2778953fabc988d (diff)
Make CVC/API BV div/mod semantics match SMT-LIB (#4997)
This commit changes the semantics of the CVC language and with the default semantics of the API for `BVUDIV`, `BVUREM`, `BVSDIV`, `BVSREM`, and `BVSMOD` to match the semantics of SMT-LIB >=2.6. Relatedly, the commit also adds comments to our API documentation for the different semantics enabled by the `bv-div-zero-const` option.
Diffstat (limited to 'test/regress/regress0/bv')
-rw-r--r--test/regress/regress0/bv/div_mod.cvc10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/regress/regress0/bv/div_mod.cvc b/test/regress/regress0/bv/div_mod.cvc
new file mode 100644
index 000000000..3f31bdd70
--- /dev/null
+++ b/test/regress/regress0/bv/div_mod.cvc
@@ -0,0 +1,10 @@
+% EXPECT: entailed
+
+x : BITVECTOR(4);
+
+QUERY
+( BVUDIV(x, 0bin0000) = 0bin1111 ) AND
+( BVUREM(x, 0bin0000) = x ) AND
+( BVSDIV(x, 0bin0000) = 0bin1111 OR BVSDIV(x, 0bin0000) = 0bin0001 ) AND
+( BVSREM(x, 0bin0000) = x ) AND
+( BVSMOD(x, 0bin0000) = x );
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback