default: break;
}
Expr e = em->mkExpr(k, lhs, rhs);
- return negate ? em->mkExpr(e.getType().isSet() ? kind::COMPLIMENT : kind::NOT, e) : e;
+ return negate ? em->mkExpr(e.getType().isSet() ? kind::COMPLEMENT : kind::NOT, e) : e;
}/* createPrecedenceTree() recursive variant */
Expr createPrecedenceTree(Parser* parser, ExprManager* em,
/** Add n NOTs to the front of e and return the result. */
Expr addNots(ExprManager* em, size_t n, Expr e) {
- Kind k = e.getType().isSet() ? kind::COMPLIMENT : kind::NOT;
+ Kind k = e.getType().isSet() ? kind::COMPLEMENT : kind::NOT;
while(n-- > 0) {
e = em->mkExpr(k, e);
}
/* BV neg */
: BVNEG_TOK bvNegTerm[f]
{ f = MK_EXPR(CVC4::kind::BITVECTOR_NOT, f); }
+ | NOT_TOK bvNegTerm[f]
+ { f = MK_EXPR(CVC4::kind::COMPLEMENT, f); }
| TRANSPOSE_TOK bvNegTerm[f]
{ f = MK_EXPR(CVC4::kind::TRANSPOSE, f); }
| TRANSCLOSURE_TOK bvNegTerm[f]
addOperator(kind::SINGLETON, "singleton");
addOperator(kind::INSERT, "insert");
addOperator(kind::CARD, "card");
- addOperator(kind::COMPLIMENT, "compliment");
+ addOperator(kind::COMPLEMENT, "complement");
break;
case THEORY_DATATYPES:
string s;
if(n.getAttribute(expr::VarNameAttr(), s)) {
out << s;
+ }else if( n.getKind() == kind::UNIVERSE_SET ){
+ out << "UNIVERSE :: " << n.getType();
} else {
if(n.getKind() == kind::VARIABLE) {
out << "var_";
op << "IS_IN";
opType = INFIX;
break;
- case kind::COMPLIMENT:
+ case kind::COMPLEMENT:
op << "NOT";
opType = PREFIX;
break;
case kind::MEMBER:
case kind::SET_TYPE:
case kind::SINGLETON:
- case kind::COMPLIMENT:out << smtKindString(k) << " "; break;
+ case kind::COMPLEMENT:out << smtKindString(k) << " "; break;
// fp theory
case kind::FLOATINGPOINT_FP:
case kind::SET_TYPE: return "Set";
case kind::SINGLETON: return "singleton";
case kind::INSERT: return "insert";
- case kind::COMPLIMENT: return "compliment";
+ case kind::COMPLEMENT: return "complement";
// fp theory
case kind::FLOATINGPOINT_FP: return "fp";
Node TermDb::getMatchOperator( Node n ) {
Kind k = n.getKind();
//datatype operators may be parametric, always assume they are
- if( k==SELECT || k==STORE || k==UNION || k==INTERSECTION || k==SUBSET || k==SETMINUS || k==MEMBER || k==SINGLETON || k==COMPLIMENT ||
+ if( k==SELECT || k==STORE || k==UNION || k==INTERSECTION || k==SUBSET || k==SETMINUS || k==MEMBER || k==SINGLETON ||
k==APPLY_SELECTOR_TOTAL || k==APPLY_TESTER || k==SEP_PTO ){
//since it is parametric, use a particular one as op
TypeNode tn = n[0].getType();
bool Trigger::isAtomicTriggerKind( Kind k ) {
return k==APPLY_UF || k==SELECT || k==STORE ||
k==APPLY_CONSTRUCTOR || k==APPLY_SELECTOR_TOTAL || k==APPLY_TESTER ||
- k==UNION || k==INTERSECTION || k==SUBSET || k==SETMINUS || k==MEMBER || k==SINGLETON || k==COMPLIMENT ||
+ k==UNION || k==INTERSECTION || k==SUBSET || k==SETMINUS || k==MEMBER || k==SINGLETON ||
k==SEP_PTO || k==BITVECTOR_TO_NAT || k==INT_TO_BITVECTOR;
}
operator SINGLETON 1 "the set of the single element given as a parameter"
operator INSERT 2: "set obtained by inserting elements (first N-1 parameters) into a set (the last parameter)"
operator CARD 1 "set cardinality operator"
-operator COMPLIMENT 1 "set compliment (with respect to finite universe)"
+operator COMPLEMENT 1 "set COMPLEMENT (with respect to finite universe)"
operator JOIN 2 "set join"
operator PRODUCT 2 "set cartesian product"
typerule EMPTYSET ::CVC4::theory::sets::EmptySetTypeRule
typerule INSERT ::CVC4::theory::sets::InsertTypeRule
typerule CARD ::CVC4::theory::sets::CardTypeRule
-typerule COMPLIMENT ::CVC4::theory::sets::ComplimentTypeRule
+typerule COMPLEMENT ::CVC4::theory::sets::ComplementTypeRule
typerule JOIN ::CVC4::theory::sets::RelBinaryOperatorTypeRule
typerule PRODUCT ::CVC4::theory::sets::RelBinaryOperatorTypeRule
construle SINGLETON ::CVC4::theory::sets::SingletonTypeRule
construle INSERT ::CVC4::theory::sets::InsertTypeRule
construle CARD ::CVC4::theory::sets::CardTypeRule
-construle COMPLIMENT ::CVC4::theory::sets::ComplimentTypeRule
+construle COMPLEMENT ::CVC4::theory::sets::ComplementTypeRule
construle JOIN ::CVC4::theory::sets::RelBinaryOperatorTypeRule
construle PRODUCT ::CVC4::theory::sets::RelBinaryOperatorTypeRule
}
break;
}//kind::UNION
- case kind::COMPLIMENT: {
+ case kind::COMPLEMENT: {
Node univ = NodeManager::currentNM()->mkUniqueVar( node[0].getType(), kind::UNIVERSE_SET );
return RewriteResponse( REWRITE_AGAIN, NodeManager::currentNM()->mkNode( kind::SETMINUS, univ, node[0] ) );
}
}
};/* struct CardTypeRule */
-struct ComplimentTypeRule {
+struct ComplementTypeRule {
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
throw (TypeCheckingExceptionPrivate, AssertionException) {
- Assert(n.getKind() == kind::COMPLIMENT);
+ Assert(n.getKind() == kind::COMPLEMENT);
TypeNode setType = n[0].getType(check);
if( check ) {
if(!setType.isSet()) {
- throw TypeCheckingExceptionPrivate(n, "compliment operates on a set, non-set object found");
+ throw TypeCheckingExceptionPrivate(n, "COMPLEMENT operates on a set, non-set object found");
}
}
return setType;
}
inline static bool computeIsConst(NodeManager* nodeManager, TNode n) {
- Assert(n.getKind() == kind::COMPLIMENT);
+ Assert(n.getKind() == kind::COMPLEMENT);
return false;
}
-};/* struct ComplimentTypeRule */
+};/* struct ComplementTypeRule */
abt-te-exh.smt2 \
abt-te-exh2.smt2 \
univset-simp.smt2 \
- compliment.cvc
+ complement.cvc \
+ complement2.cvc
EXTRA_DIST = $(TESTS)
--- /dev/null
+% EXPECT: sat
+OPTION "logic" "ALL_SUPPORTED";
+Atom: TYPE;
+a : SET OF [Atom];
+b : SET OF [Atom];
+
+ASSERT a = (NOT b);
+
+CHECKSAT;
--- /dev/null
+% EXPECT: unsat\r
+OPTION "logic" "ALL_SUPPORTED";\r
+Atom: TYPE;\r
+a : SET OF Atom;\r
+b : SET OF Atom;\r
+c : Atom;\r
+\r
+ASSERT a = NOT(a);\r
+ASSERT c IS_IN a;\r
+\r
+CHECKSAT;\r
+++ /dev/null
-% EXPECT: sat
-OPTION "logic" "ALL_SUPPORTED";
-Atom: TYPE;
-a : SET OF [Atom];
-b : SET OF [Atom];
-
-ASSERT a = (NOT b);
-
-CHECKSAT;
(assert (not (member 1 c)))
(assert (member 2 d))
(assert (= e (as univset (Set Int))))
-(assert (= f (compliment d)))
+(assert (= f (complement d)))
(assert (not (member x (as univset (Set Int)))))
(check-sat)