Kind lassocKind = CVC4::kind::UNDEFINED_KIND;
if (args.size() >= 2)
{
- if (kind == CVC4::kind::INTS_DIVISION)
+ if (kind == CVC4::kind::INTS_DIVISION
+ || (kind == CVC4::kind::BITVECTOR_XNOR && PARSER_STATE->v2_6()))
{
// Builtin operators that are not tokenized, are left associative,
// but not internally variadic must set this.
// that CVC4 permits as N-ary but the standard requires is binary
if(strictModeEnabled()) {
switch(kind) {
- case kind::BITVECTOR_CONCAT:
case kind::BITVECTOR_AND:
- case kind::BITVECTOR_OR:
- case kind::BITVECTOR_XOR:
case kind::BITVECTOR_MULT:
+ case kind::BITVECTOR_OR:
case kind::BITVECTOR_PLUS:
+ case kind::BITVECTOR_XOR:
+ if (numArgs != 2 && !v2_6())
+ {
+ parseError(
+ "Operator requires exactly 2 arguments in strict SMT-LIB "
+ "compliance mode (for versions <2.6): "
+ + kindToString(kind));
+ }
+ break;
+ case kind::BITVECTOR_CONCAT:
if(numArgs != 2) {
- parseError("Operator requires exact 2 arguments in strict SMT-LIB "
- "compliance mode: " + kindToString(kind));
+ parseError(
+ "Operator requires exactly 2 arguments in strict SMT-LIB "
+ "compliance mode: "
+ + kindToString(kind));
}
break;
default:
regress0/options/invalid_dump.smt2
regress0/parallel-let.smt2
regress0/parser/as.smt2
+ regress0/parser/bv_arity_smt2.6.smt2
regress0/parser/constraint.smt2
regress0/parser/declarefun-emptyset-uf.smt2
regress0/parser/shadow_fun_symbol_all.smt2
--- /dev/null
+; 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)