diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2019-04-16 12:11:37 -0700 |
---|---|---|
committer | Mathias Preiner <mathias.preiner@gmail.com> | 2019-04-16 12:11:37 -0700 |
commit | 2f7131c81078a964a4043ef79186cdcf91951974 (patch) | |
tree | 14fe132462c8be51f19578448033acd3f08b7eff /test/regress/regress0/parser | |
parent | a47b722aa31cdd036f83425b2a805e6a572a974b (diff) |
Make bv{add,mul,and,or,xor,xnor} left-associative (#2955)
The most recent version of SMT-LIB defines bv{add,mul,and,or,xor,xnor}
[0, 1] as left-associative. CVC4 treats all but bvxnor as having
variable arity anyway but the arity check was too strict when using
`--strict-parsing`. This commit changes the strict parsing check. For
bvxnor, it adds code to the parser that expands an application of bvxnor
into multiple applications of a binary bvxnor if needed.
References:
[0] http://smtlib.cs.uiowa.edu/theories-FixedSizeBitVectors.shtml (bvand,
bvor, bvadd, bvmul)
[1] http://smtlib.cs.uiowa.edu/logics-all.shtml#QF_BV (bvxor, bvxnor)
Diffstat (limited to 'test/regress/regress0/parser')
-rw-r--r-- | test/regress/regress0/parser/bv_arity_smt2.6.smt2 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/regress/regress0/parser/bv_arity_smt2.6.smt2 b/test/regress/regress0/parser/bv_arity_smt2.6.smt2 new file mode 100644 index 000000000..437d80f56 --- /dev/null +++ b/test/regress/regress0/parser/bv_arity_smt2.6.smt2 @@ -0,0 +1,13 @@ +; COMMAND-LINE: --strict-parsing +(set-info :status unsat) +(set-logic QF_BV) +(declare-const x (_ BitVec 8)) +(declare-const y (_ BitVec 8)) +(declare-const z (_ BitVec 8)) +(assert (or (not (= (bvadd x y z) (bvadd (bvadd x y) z))) + (not (= (bvmul x y z) (bvmul (bvmul x y) z))) + (not (= (bvand x y z) (bvand (bvand x y) z))) + (not (= (bvor x y z) (bvor (bvor x y) z))) + (not (= (bvxor x y z) (bvxor (bvxor x y) z))) + (not (= (bvxnor x y z) (bvxnor (bvxnor x y) z))))) +(check-sat) |