This further renames kind SET_INTERSECTION to SET_INTER.
| | | |
| | | ``Term t = solver.mkTerm(Kind::SET_UNION, X, Y);`` |
+----------------------+----------------------------------------------+-------------------------------------------------------------------------+
-| Intersection | ``(set.minus X Y)`` | ``Term t = solver.mkTerm(Kind::SET_MINUS, X, Y);`` |
+| Intersection | ``(set.inter X Y)`` | ``Term t = solver.mkTerm(Kind::SET_INTER, X, Y);`` |
++----------------------+----------------------------------------------+-------------------------------------------------------------------------+
+| Minus | ``(set.minus X Y)`` | ``Term t = solver.mkTerm(Kind::SET_MINUS, X, Y);`` |
+----------------------+----------------------------------------------+-------------------------------------------------------------------------+
| Membership | ``(set.member x X)`` | ``Term x = solver.mkConst(solver.getIntegerSort(), "x");`` |
| | | |
^^^^^^^^^
The semantics of most of the above operators (e.g., ``set.union``,
-``set.intersection``, difference) are straightforward.
+``set.inter``, difference) are straightforward.
The semantics for the universe set and complement are more subtle and explained
in the following.
Term C = slv.mkConst(set, "C");
Term unionAB = slv.mkTerm(SET_UNION, A, B);
- Term lhs = slv.mkTerm(SET_INTERSECTION, unionAB, C);
+ Term lhs = slv.mkTerm(SET_INTER, unionAB, C);
- Term intersectionAC = slv.mkTerm(SET_INTERSECTION, A, C);
- Term intersectionBC = slv.mkTerm(SET_INTERSECTION, B, C);
+ Term intersectionAC = slv.mkTerm(SET_INTER, A, C);
+ Term intersectionBC = slv.mkTerm(SET_INTER, B, C);
Term rhs = slv.mkTerm(SET_UNION, intersectionAC, intersectionBC);
Term theorem = slv.mkTerm(EQUAL, lhs, rhs);
Term singleton_three = slv.mkTerm(SET_SINGLETON, three);
Term one_two = slv.mkTerm(SET_UNION, singleton_one, singleton_two);
Term two_three = slv.mkTerm(SET_UNION, singleton_two, singleton_three);
- Term intersection = slv.mkTerm(SET_INTERSECTION, one_two, two_three);
+ Term intersection = slv.mkTerm(SET_INTER, one_two, two_three);
Term x = slv.mkConst(integer, "x");
C = slv.mkConst(set_, "C")
unionAB = slv.mkTerm(kinds.SetUnion, A, B)
- lhs = slv.mkTerm(kinds.SetIntersection, unionAB, C)
+ lhs = slv.mkTerm(kinds.SetInter, unionAB, C)
- intersectionAC = slv.mkTerm(kinds.SetIntersection, A, C)
- intersectionBC = slv.mkTerm(kinds.SetIntersection, B, C)
+ intersectionAC = slv.mkTerm(kinds.SetInter, A, C)
+ intersectionBC = slv.mkTerm(kinds.SetInter, B, C)
rhs = slv.mkTerm(kinds.SetUnion, intersectionAC, intersectionBC)
theorem = slv.mkTerm(kinds.Equal, lhs, rhs)
singleton_three = slv.mkTerm(kinds.SetSingleton, three)
one_two = slv.mkTerm(kinds.SetUnion, singleton_one, singleton_two)
two_three = slv.mkTerm(kinds.SetUnion, singleton_two, singleton_three)
- intersection = slv.mkTerm(kinds.SetIntersection, one_two, two_three)
+ intersection = slv.mkTerm(kinds.SetInter, one_two, two_three)
x = slv.mkConst(integer, "x")
(check-sat-assuming
(
(distinct
- (set.intersection (set.union A B) C)
- (set.union (set.intersection A C) (set.intersection B C)))
+ (set.inter (set.union A B) C)
+ (set.union (set.inter A C) (set.inter B C)))
)
)
(
(set.member
x
- (set.intersection
+ (set.inter
(set.union (set.singleton 1) (set.singleton 2))
(set.union (set.singleton 2) (set.singleton 3))))
)
<< " ( (s1 " << name << ") (s2 " << name << ") )"
<< " " << name << ""
<< " ((_ map and) s1 s2))" << endl;
- setoperators[make_pair(t, kind::SET_INTERSECTION)] =
+ setoperators[make_pair(t, kind::SET_INTER)] =
em->mkVar(std::string("intersection") + elementTypeAsString,
em->mkFunctionType(t_t, t));
/* Sets ---------------------------------------------------------------- */
{SET_EMPTY, cvc5::Kind::SET_EMPTY},
{SET_UNION, cvc5::Kind::SET_UNION},
- {SET_INTERSECTION, cvc5::Kind::SET_INTERSECTION},
+ {SET_INTER, cvc5::Kind::SET_INTER},
{SET_MINUS, cvc5::Kind::SET_MINUS},
{SET_SUBSET, cvc5::Kind::SET_SUBSET},
{SET_MEMBER, cvc5::Kind::SET_MEMBER},
/* Sets ------------------------------------------------------------ */
{cvc5::Kind::SET_EMPTY, SET_EMPTY},
{cvc5::Kind::SET_UNION, SET_UNION},
- {cvc5::Kind::SET_INTERSECTION, SET_INTERSECTION},
+ {cvc5::Kind::SET_INTER, SET_INTER},
{cvc5::Kind::SET_MINUS, SET_MINUS},
{cvc5::Kind::SET_SUBSET, SET_SUBSET},
{cvc5::Kind::SET_MEMBER, SET_MEMBER},
* - `Solver::mkTerm(Kind kind, const Term& child1, const Term& child2) const`
* - `Solver::mkTerm(Kind kind, const std::vector<Term>& children) const`
*/
- SET_INTERSECTION,
+ SET_INTER,
/**
* Set subtraction.
*
d_solver->mkUniverseSet(d_solver->getBooleanSort()));
addOperator(api::SET_UNION, "set.union");
- addOperator(api::SET_INTERSECTION, "set.intersection");
+ addOperator(api::SET_INTER, "set.inter");
addOperator(api::SET_MINUS, "set.minus");
addOperator(api::SET_SUBSET, "set.subset");
addOperator(api::SET_MEMBER, "set.member");
// set theory
case kind::SET_UNION: return "set.union";
- case kind::SET_INTERSECTION: return "set.intersection";
+ case kind::SET_INTER: return "set.inter";
case kind::SET_MINUS: return "set.minus";
case kind::SET_SUBSET: return "set.subset";
case kind::SET_MEMBER: return "set.member";
// where these two things require those kinds respectively.
return k == APPLY_UF || k == SELECT || k == STORE || k == APPLY_CONSTRUCTOR
|| k == APPLY_SELECTOR || k == APPLY_SELECTOR_TOTAL
- || k == APPLY_TESTER || k == SET_UNION || k == SET_INTERSECTION
+ || k == APPLY_TESTER || k == SET_UNION || k == SET_INTER
|| k == SET_SUBSET || k == SET_MINUS || k == SET_MEMBER
|| k == SET_SINGLETON || k == SEP_PTO || k == BITVECTOR_TO_NAT
|| k == INT_TO_BITVECTOR || k == HO_APPLY || k == STRING_LENGTH
sdts[i].addConstructor(lambda, "singleton", cargsSingleton);
// add for union, difference, intersection
- std::vector<Kind> bin_kinds = {SET_UNION, SET_INTERSECTION, SET_MINUS};
+ std::vector<Kind> bin_kinds = {SET_UNION, SET_INTER, SET_MINUS};
std::vector<TypeNode> cargsBinary;
cargsBinary.push_back(unres_t);
cargsBinary.push_back(unres_t);
Node TermDb::getMatchOperator( Node n ) {
Kind k = n.getKind();
//datatype operators may be parametric, always assume they are
- if (k == SELECT || k == STORE || k == SET_UNION || k == SET_INTERSECTION
+ if (k == SELECT || k == STORE || k == SET_UNION || k == SET_INTER
|| k == SET_SUBSET || k == SET_MINUS || k == SET_MEMBER
|| k == SET_SINGLETON || k == APPLY_SELECTOR_TOTAL || k == APPLY_SELECTOR
|| k == APPLY_TESTER || k == SEP_PTO || k == HO_APPLY || k == SEQ_NTH
{
if (reqNAry)
{
- if (k == SET_UNION || k == SET_INTERSECTION)
+ if (k == SET_UNION || k == SET_INTER)
{
return false;
}
|| k == XOR || k == BITVECTOR_ADD || k == BITVECTOR_MULT
|| k == BITVECTOR_AND || k == BITVECTOR_OR || k == BITVECTOR_XOR
|| k == BITVECTOR_XNOR || k == BITVECTOR_CONCAT || k == STRING_CONCAT
- || k == SET_UNION || k == SET_INTERSECTION || k == RELATION_JOIN
+ || k == SET_UNION || k == SET_INTER || k == RELATION_JOIN
|| k == RELATION_PRODUCT || k == SEP_STAR;
}
{
if (reqNAry)
{
- if (k == SET_UNION || k == SET_INTERSECTION)
+ if (k == SET_UNION || k == SET_INTER)
{
return false;
}
return k == EQUAL || k == PLUS || k == MULT || k == NONLINEAR_MULT || k == AND
|| k == OR || k == XOR || k == BITVECTOR_ADD || k == BITVECTOR_MULT
|| k == BITVECTOR_AND || k == BITVECTOR_OR || k == BITVECTOR_XOR
- || k == BITVECTOR_XNOR || k == SET_UNION || k == SET_INTERSECTION
+ || k == BITVECTOR_XNOR || k == SET_UNION || k == SET_INTER
|| k == SEP_STAR;
}
{
for (size_t j = (i + 1); j < lsize; j++)
{
- Node s = nm->mkNode(SET_INTERSECTION, labels[i], labels[j]);
+ Node s = nm->mkNode(SET_INTER, labels[i], labels[j]);
Node ilem = s.eqNode(empSet);
Trace("sep-lemma-debug")
<< "Sep::Lemma : star reduction, disjoint : " << ilem
Trace("sep-lemma-debug")
<< "Sep::Lemma : wand reduction, union : " << ulem << std::endl;
c_lems.push_back(ulem);
- Node s = nm->mkNode(SET_INTERSECTION, slbl, labels[0]);
+ Node s = nm->mkNode(SET_INTER, slbl, labels[0]);
Node ilem = s.eqNode(empSet);
Trace("sep-lemma-debug")
<< "Sep::Lemma : wand reduction, disjoint : " << ilem << std::endl;
Node sub_lbl = itl->second;
Node lbl_mval = d_label_model[sub_lbl].getValue( rtn );
for( unsigned j=0; j<vs.size(); j++ ){
- bchildren.push_back(
- NodeManager::currentNM()
- ->mkNode(kind::SET_INTERSECTION, lbl_mval, vs[j])
- .eqNode(empSet));
+ bchildren.push_back(NodeManager::currentNM()
+ ->mkNode(kind::SET_INTER, lbl_mval, vs[j])
+ .eqNode(empSet));
}
vs.push_back( lbl_mval );
if( vsu.isNull() ){
//disjoint constraints
Node sub_lbl_0 = d_label_map[n][lbl][0];
Node lbl_mval_0 = d_label_model[sub_lbl_0].getValue( rtn );
- wchildren.push_back(
- NodeManager::currentNM()
- ->mkNode(kind::SET_INTERSECTION, lbl_mval_0, lbl)
- .eqNode(empSet)
- .negate());
+ wchildren.push_back(NodeManager::currentNM()
+ ->mkNode(kind::SET_INTER, lbl_mval_0, lbl)
+ .eqNode(empSet)
+ .negate());
//return the lemma
wchildren.push_back( children[0].negate() );
// if setminus, do for intersection instead
if (n.getKind() == SET_MINUS)
{
- n = rewrite(nm->mkNode(SET_INTERSECTION, n[0], n[1]));
+ n = rewrite(nm->mkNode(SET_INTER, n[0], n[1]));
}
registerCardinalityTerm(n);
}
NodeManager* nm = NodeManager::currentNM();
Trace("sets-card") << "Cardinality lemmas for " << n << " : " << std::endl;
std::vector<Node> cterms;
- if (n.getKind() == SET_INTERSECTION)
+ if (n.getKind() == SET_INTER)
{
for (unsigned e = 0; e < 2; e++)
{
for (const Node& n : nvsets)
{
Kind nk = n.getKind();
- if (nk != SET_INTERSECTION && nk != SET_MINUS)
+ if (nk != SET_INTER && nk != SET_MINUS)
{
continue;
}
<< std::endl;
std::vector<Node> sib;
unsigned true_sib = 0;
- if (n.getKind() == SET_INTERSECTION)
+ if (n.getKind() == SET_INTER)
{
d_localBase[n] = n;
for (unsigned e = 0; e < 2; e++)
}
else
{
- Node si = rewrite(nm->mkNode(SET_INTERSECTION, n[0], n[1]));
+ Node si = rewrite(nm->mkNode(SET_INTER, n[0], n[1]));
sib.push_back(si);
d_localBase[n] = si;
Node osm = rewrite(nm->mkNode(SET_MINUS, n[1], n[0]));
<< "Sibling " << sib[si] << " is already empty." << std::endl;
}
}
- if (!is_union && nk == SET_INTERSECTION && !u.isNull())
+ if (!is_union && nk == SET_INTER && !u.isNull())
{
// union is equal to other parent
if (!d_state.areEqual(u, n[1 - e]))
<< " are equal, ids = " << card_parent_ids[l]
<< " " << card_parent_ids[k] << std::endl;
dup = true;
- if (n.getKind() != SET_INTERSECTION)
+ if (n.getKind() != SET_INTER)
{
continue;
}
Node r1 = e == 0 ? o0 : o1;
Node r2 = e == 0 ? o1 : o0;
// check if their intersection exists modulo equality
- Node r1r2i = d_state.getBinaryOpTerm(SET_INTERSECTION, r1, r2);
+ Node r1r2i = d_state.getBinaryOpTerm(SET_INTER, r1, r2);
if (!r1r2i.isNull())
{
Trace("sets-nf-debug")
Assert(o0 != o1);
Node kca = d_treg.getProxy(o0);
Node kcb = d_treg.getProxy(o1);
- Node intro = rewrite(nm->mkNode(SET_INTERSECTION, kca, kcb));
+ Node intro = rewrite(nm->mkNode(SET_INTER, kca, kcb));
Trace("sets-nf") << " Intro split : " << o0 << " against " << o1
<< ", term is " << intro << std::endl;
intro_sets.push_back(intro);
# operators
operator SET_UNION 2 "set union"
-operator SET_INTERSECTION 2 "set intersection"
+operator SET_INTER 2 "set intersection"
operator SET_MINUS 2 "set subtraction"
operator SET_SUBSET 2 "subset predicate; first parameter a subset of second"
operator SET_MEMBER 2 "set membership predicate; first parameter a member of second"
operator RELATION_IDEN 1 "relation identity"
typerule SET_UNION ::cvc5::theory::sets::SetsBinaryOperatorTypeRule
-typerule SET_INTERSECTION ::cvc5::theory::sets::SetsBinaryOperatorTypeRule
+typerule SET_INTER ::cvc5::theory::sets::SetsBinaryOperatorTypeRule
typerule SET_MINUS ::cvc5::theory::sets::SetsBinaryOperatorTypeRule
typerule SET_SUBSET ::cvc5::theory::sets::SubsetTypeRule
typerule SET_MEMBER ::cvc5::theory::sets::MemberTypeRule
}
}
}
- else if (nk == SET_SINGLETON || nk == SET_UNION || nk == SET_INTERSECTION
+ else if (nk == SET_SINGLETON || nk == SET_UNION || nk == SET_INTER
|| nk == SET_MINUS || nk == SET_EMPTY || nk == SET_UNIVERSE)
{
if (nk == SET_SINGLETON)
Node TermRegistry::getProxy(Node n)
{
Kind nk = n.getKind();
- if (nk != SET_EMPTY && nk != SET_SINGLETON && nk != SET_INTERSECTION
+ if (nk != SET_EMPTY && nk != SET_SINGLETON && nk != SET_INTER
&& nk != SET_MINUS && nk != SET_UNION && nk != SET_UNIVERSE)
{
return n;
// functions we are doing congruence over
d_equalityEngine->addFunctionKind(SET_SINGLETON);
d_equalityEngine->addFunctionKind(SET_UNION);
- d_equalityEngine->addFunctionKind(SET_INTERSECTION);
+ d_equalityEngine->addFunctionKind(SET_INTER);
d_equalityEngine->addFunctionKind(SET_MINUS);
d_equalityEngine->addFunctionKind(SET_MEMBER);
d_equalityEngine->addFunctionKind(SET_SUBSET);
// see if there are members in second argument
const std::map<Node, Node>& r2mem = d_state.getMembers(r2);
const std::map<Node, Node>& r2nmem = d_state.getNegativeMembers(r2);
- if (!r2mem.empty() || k != kind::SET_INTERSECTION)
+ if (!r2mem.empty() || k != kind::SET_INTER)
{
Trace("sets-debug")
<< "Checking " << term << ", members = " << (!r1mem.empty())
{
valid = true;
}
- else if (k == kind::SET_INTERSECTION)
+ else if (k == kind::SET_INTER)
{
// conclude x is in term
// if also existing in members of r2
nm->mkNode(kind::EQUAL, node[0], node[1][0]));
}
else if (node[1].getKind() == kind::SET_UNION
- || node[1].getKind() == kind::SET_INTERSECTION
+ || node[1].getKind() == kind::SET_INTER
|| node[1].getKind() == kind::SET_MINUS)
{
std::vector<Node> children;
else if (node[1].getKind() == kind::SET_MINUS && node[1][0] == node[0])
{
// (setminus A (setminus A B)) = (intersection A B)
- Node intersection = nm->mkNode(SET_INTERSECTION, node[0], node[1][1]);
+ Node intersection = nm->mkNode(SET_INTER, node[0], node[1][1]);
return RewriteResponse(REWRITE_AGAIN, intersection);
}
else if (node[1].getKind() == kind::SET_UNIVERSE)
break;
} // kind::SET_MINUS
- case kind::SET_INTERSECTION:
+ case kind::SET_INTER:
{
if(node[0] == node[1]) {
Trace("sets-postrewrite") << "Sets::postRewrite returning " << node[0] << std::endl;
NodeManager::currentNM()->mkNode(
kind::SET_CARD,
NodeManager::currentNM()->mkNode(
- kind::SET_INTERSECTION, node[0][0], node[0][1])));
+ kind::SET_INTER, node[0][0], node[0][1])));
return RewriteResponse(REWRITE_DONE, ret );
}
else if (node[0].getKind() == kind::SET_MINUS)
NodeManager::currentNM()->mkNode(
kind::SET_CARD,
NodeManager::currentNM()->mkNode(
- kind::SET_INTERSECTION, node[0][0], node[0][1])));
+ kind::SET_INTER, node[0][0], node[0][1])));
return RewriteResponse(REWRITE_DONE, ret );
}
break;
TNode n,
bool check)
{
- Assert(n.getKind() == kind::SET_UNION || n.getKind() == kind::SET_INTERSECTION
+ Assert(n.getKind() == kind::SET_UNION || n.getKind() == kind::SET_INTER
|| n.getKind() == kind::SET_MINUS);
TypeNode setType = n[0].getType(check);
if (check)
TNode n)
{
// only SET_UNION has a const rule in kinds.
- // SET_INTERSECTION and SET_MINUS are not used in the canonical representation
+ // SET_INTER and SET_MINUS are not used in the canonical representation
// of sets and therefore they do not have const rules in kinds
Assert(n.getKind() == kind::SET_UNION);
return NormalForm::checkNormalConstant(n);
(assert (set.member t_tup Target))
(assert (set.subset (rel.join (rel.join Book addr) Target) Name))
(assert (set.subset (rel.join Book names) Name))
-(assert (= (set.intersection Name Addr) (as set.empty (Set (Tuple Atom)))))
+(assert (= (set.inter Name Addr) (as set.empty (Set (Tuple Atom)))))
(assert (= (rel.join (set.singleton n_tup) (rel.join (set.singleton b1_tup) addr)) (as set.empty (Set (Tuple Atom)))))
(assert (let ((_let_1 (set.singleton n_tup))) (= (rel.join _let_1 (rel.join (set.singleton b2_tup) addr)) (set.union (rel.join _let_1 (rel.join (set.singleton b1_tup) addr)) (set.singleton t_tup)))))
(assert (let ((_let_1 (set.singleton n_tup))) (= (rel.join _let_1 (rel.join (set.singleton b3_tup) addr)) (set.minus (rel.join _let_1 (rel.join (set.singleton b2_tup) addr)) (set.singleton t_tup)))))
(assert (set.member v x))
(assert (set.member a x))
(assert (= id (rel.iden t)))
-(assert (not (set.member (tuple 1 1) (set.intersection id x))))
+(assert (not (set.member (tuple 1 1) (set.inter id x))))
(check-sat)
(declare-fun C4 () (Set (Tuple Atom)))
(declare-fun ATOM_UNIV () (Set (Tuple Atom)))
(declare-fun V1 () Atom)
-(assert (= C32 (set.intersection (set.complement C2) (set.complement C4))))
+(assert (= C32 (set.inter (set.complement C2) (set.complement C4))))
(assert (set.member (tuple V1) (set.complement C32)))
(assert (= ATOM_UNIV (as set.universe (Set (Tuple Atom)))))
(assert (set.member (tuple V1) ATOM_UNIV))
(declare-fun e () Int)
(assert (= a (set.singleton 5)))
(assert (= c (set.union a b)))
-(assert (not (= c (set.intersection a b))))
+(assert (not (= c (set.inter a b))))
(assert (= c (set.minus a b)))
(assert (set.subset a b))
(assert (set.member e c))
(assert (set.member e a))
-(assert (set.member e (set.intersection a b)))
+(assert (set.member e (set.inter a b)))
(push 1)
(assert true)
(declare-fun H () (Set Int) )
(declare-fun I () (Set Int) )
(declare-fun x () Int)
-(assert (set.member x (set.intersection (set.union A B) C)))
+(assert (set.member x (set.inter (set.union A B) C)))
(assert (not (set.member x G)))
(assert (= (set.union A B) D))
-(assert (= C (set.intersection E F)))
+(assert (= C (set.inter E F)))
(assert (and (= F H) (= G H) (= H I)))
(check-sat)
(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (set.member x s))
(define-fun smt_set_add ((s mySet) (x Elt)) mySet (set.union s (set.singleton x)))
(define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (set.union s1 s2))
-(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.intersection s1 s2))
+(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.inter s1 s2))
(define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (set.minus s1 s2))
(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (set.member x s))
(define-fun smt_set_add ((s mySet) (x Elt)) mySet (set.union s (set.singleton x)))
(define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (set.union s1 s2))
-(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.intersection s1 s2))
+(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.inter s1 s2))
;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s))
(define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (set.minus s1 s2))
;(define-fun smt_set_sub ((s1 mySet) (s2 mySet)) Bool (= smt_set_emp (smt_set_dif s1 s2)))
(assert (! (= sk_?X_36$0 FP$0) :named precondition_of_rec_copy_loop_34_11_18))
-(assert (! (= (as set.empty SetLoc) (set.intersection sk_?X_38$0 sk_?X_37$0))
+(assert (! (= (as set.empty SetLoc) (set.inter sk_?X_38$0 sk_?X_37$0))
:named precondition_of_rec_copy_loop_34_11_19))
(assert (! (= old_cp_2$0 cp$0) :named assign_41_4))
(declare-fun b () (Set Int))
(declare-fun x () Int)
;(assert (not (set.member x a)))
-(assert (set.member x (set.intersection a b)))
+(assert (set.member x (set.inter a b)))
(assert (not (set.member x b)))
(check-sat)
(exit)
(declare-fun x () Int)
(assert (set.member x (set.union A B)))
-(assert (not (set.member x (set.intersection A B))))
+(assert (not (set.member x (set.inter A B))))
(assert (not (set.member x (set.minus A B))))
;(assert (not (set.member x (set.minus B A))))
;(assert (set.member x B))
(assert (= t1 (set.union s (set.singleton 2.5))))
(assert (= t2 (set.union s (set.singleton 2.0))))
(assert (= t3 (set.union r3 (set.singleton 2.5))))
-(assert (= (set.intersection r1 r2) (set.intersection s (set.singleton 0.0))))
+(assert (= (set.inter r1 r2) (set.inter s (set.singleton 0.0))))
(assert (not (= r1 (as set.empty (Set Real)))))
(check-sat)
(declare-fun e () Int)
(assert (= a (set.singleton 5)))
(assert (= c (set.union a b) ))
-(assert (not (= c (set.intersection a b) )))
+(assert (not (= c (set.inter a b) )))
(assert (= c (set.minus a b) ))
(assert (set.subset a b))
(assert (set.member e c))
(assert (set.member e a))
-(assert (set.member e (set.intersection a b)))
+(assert (set.member e (set.inter a b)))
(check-sat)
(pop 1)
(assert (set.member x A))
(assert (set.member y B))
-(assert (or (= C (set.intersection A B)) (= D (set.intersection A B))))
+(assert (or (= C (set.inter A B)) (= D (set.inter A B))))
(check-sat)
(assert (forall ((?s1 Set) (?s2 Set)) (= (seteq ?s1 ?s2) (and (set.subset ?s1 ?s2) (set.subset ?s2 ?s1)))))
(declare-fun union (Set Set) Set)
(assert (forall ((?x Elem) (?s1 Set) (?s2 Set)) (= (set.member ?x (union ?s1 ?s2)) (or (set.member ?x ?s1) (set.member ?x ?s2)))))
-(declare-fun set.intersection (Set Set) Set)
-(assert (forall ((?x Elem) (?s1 Set) (?s2 Set)) (= (set.member ?x (set.intersection ?s1 ?s2)) (and (set.member ?x ?s1) (set.member ?x ?s2)))))
+(declare-fun set.inter (Set Set) Set)
+(assert (forall ((?x Elem) (?s1 Set) (?s2 Set)) (= (set.member ?x (set.inter ?s1 ?s2)) (and (set.member ?x ?s1) (set.member ?x ?s2)))))
(declare-fun difference (Set Set) Set)
(assert (forall ((?x Elem) (?s1 Set) (?s2 Set)) (= (set.member ?x (difference ?s1 ?s2)) (and (set.member ?x ?s1) (not (set.member ?x ?s2))))))
(declare-fun a () Set)
(declare-fun b () Set)
-(assert (not (seteq (set.intersection a b) (set.intersection b a))))
+(assert (not (seteq (set.inter a b) (set.inter b a))))
(check-sat)
(exit)
(assert (= r (rel.join x y)))
(declare-fun e () (Tuple Int Int))
(assert (not (set.member e r)))
-(assert (not (= z (set.intersection x y))))
+(assert (not (= z (set.inter x y))))
(assert (= z (set.minus x y)))
(assert (set.subset x y))
(assert (set.member e (rel.join r z)))
(assert (set.member e x))
-(assert (set.member e (set.intersection x y)))
+(assert (set.member e (set.inter x y)))
(push 1)
(assert true)
(assert (= w (set.singleton e)))
(assert (set.subset (rel.transpose w) y))
(assert (not (set.member e r)))
-(assert (not (= z (set.intersection x y))))
+(assert (not (= z (set.inter x y))))
(assert (= z (set.minus x y)))
(assert (set.subset x y))
(assert (set.member e (rel.join r z)))
(assert (set.member e x))
-(assert (set.member e (set.intersection x y)))
+(assert (set.member e (set.inter x y)))
(push 1)
(assert true)
(assert (let ((_let_1 (set.singleton a))) (= w (rel.product _let_1 _let_1))))
(assert (set.subset (rel.transpose w) y))
(assert (not (set.member e r)))
-(assert (not (= z (set.intersection x y))))
+(assert (not (= z (set.inter x y))))
(assert (= z (set.minus x y)))
(assert (set.subset x y))
(assert (set.member e (rel.join r z)))
(assert (set.member e x))
-(assert (set.member e (set.intersection x y)))
+(assert (set.member e (set.inter x y)))
(push 1)
(assert true)
(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (set.member x s))
(define-fun smt_set_add ((s mySet) (x Elt)) mySet (set.union s (set.singleton x)))
(define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (set.union s1 s2))
-(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.intersection s1 s2))
+(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.inter s1 s2))
;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s))
(define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (set.minus s1 s2))
;(define-fun smt_set_sub ((s1 mySet) (s2 mySet)) Bool (= smt_set_emp (smt_set_dif s1 s2)))
(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (set.member x s))
(define-fun smt_set_add ((s mySet) (x Elt)) mySet (set.union s (set.singleton x)))
(define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (set.union s1 s2))
-(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.intersection s1 s2))
+(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.inter s1 s2))
;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s))
(define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (set.minus s1 s2))
;(define-fun smt_set_sub ((s1 mySet) (s2 mySet)) Bool (= smt_set_emp (smt_set_dif s1 s2)))
(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (set.member x s))
(define-fun smt_set_add ((s mySet) (x Elt)) mySet (set.union s (set.singleton x)))
(define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (set.union s1 s2))
-(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.intersection s1 s2))
+(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.inter s1 s2))
;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s))
(define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (set.minus s1 s2))
;(define-fun smt_set_sub ((s1 mySet) (s2 mySet)) Bool (= smt_set_emp (smt_set_dif s1 s2)))
(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (set.member x s))
(define-fun smt_set_add ((s mySet) (x Elt)) mySet (set.union s (set.singleton x)))
(define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (set.union s1 s2))
-(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.intersection s1 s2))
+(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.inter s1 s2))
(define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (set.minus s1 s2))
(define-fun smt_set_sub ((s1 mySet) (s2 mySet)) Bool (set.subset s1 s2))
(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (set.member x s))
(define-fun smt_set_add ((s mySet) (x Elt)) mySet (set.union s (set.singleton x)))
(define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (set.union s1 s2))
-(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.intersection s1 s2))
+(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.inter s1 s2))
(define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (set.minus s1 s2))
(define-fun smt_set_sub ((s1 mySet) (s2 mySet)) Bool (set.subset s1 s2))
(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (set.member x s))
(define-fun smt_set_add ((s mySet) (x Elt)) mySet (set.union s (set.singleton x)))
(define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (set.union s1 s2))
-(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.intersection s1 s2))
+(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.inter s1 s2))
(define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (set.minus s1 s2))
(define-fun smt_set_sub ((s1 mySet) (s2 mySet)) Bool (set.subset s1 s2))
(declare-fun z3v66 () Int)
(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (set.member x s))
(define-fun smt_set_add ((s mySet) (x Elt)) mySet (set.union s (set.singleton x)))
(define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (set.union s1 s2))
-(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.intersection s1 s2))
+(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.inter s1 s2))
;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s))
(define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (set.minus s1 s2))
;(define-fun smt_set_sub ((s1 mySet) (s2 mySet)) Bool (= smt_set_emp (smt_set_dif s1 s2)))
(assert (>= (set.card (set.union s u)) 8))
(assert (<= (set.card (set.union t u)) 5))
(assert (<= (set.card s) 5))
-(assert (= (as set.empty (Set E)) (set.intersection t u)))
+(assert (= (as set.empty (Set E)) (set.inter t u)))
(check-sat)
(assert (>= (set.card (set.union s u)) 8))
;(assert (<= (set.card (set.union t u)) 5))
(assert (<= (set.card s) 5))
-(assert (= (as set.empty (Set E)) (set.intersection t u)))
+(assert (= (as set.empty (Set E)) (set.inter t u)))
(declare-fun x1 () E)
(declare-fun x2 () E)
(declare-fun x3 () E)
(assert (>= (set.card (set.union s u)) 8))
;(assert (<= (set.card (set.union t u)) 5))
(assert (<= (set.card s) 5))
-(assert (= (as set.empty (Set E)) (set.intersection t u)))
+(assert (= (as set.empty (Set E)) (set.inter t u)))
(declare-fun x1 () E)
(declare-fun x2 () E)
(declare-fun x3 () E)
(assert
(and
(= (as set.empty (Set E))
- (set.intersection A B))
+ (set.inter A B))
(set.subset C (set.union A B))
(>= (set.card C) 5)
(<= (set.card A) 2)
(assert (= x (set.comprehension ((z Int)) (> z 4) (* 5 z))))
(assert (= y (set.comprehension ((z Int)) (< z 10) (+ (* 5 z) 1))))
-(assert (not (= (set.intersection x y) (as set.empty (Set Int)))))
+(assert (not (= (set.inter x y) (as set.empty (Set Int)))))
(check-sat)
(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (set.member x s))
(define-fun smt_set_add ((s mySet) (x Elt)) mySet (set.union s (set.singleton x)))
(define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (set.union s1 s2))
-(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.intersection s1 s2))
+(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.inter s1 s2))
;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s))
(define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (set.minus s1 s2))
;(define-fun smt_set_sub ((s1 mySet) (s2 mySet)) Bool (= smt_set_emp (smt_set_dif s1 s2)))
(declare-fun universe () (Set Bool))
(assert (= (set.card A) 2))
(assert (= (set.card B) 2))
-(assert (= (set.intersection A B) (as set.empty (Set Bool))))
+(assert (= (set.inter A B) (as set.empty (Set Bool))))
(assert (= universe (as set.universe (Set Bool))))
(check-sat)
(assert (= (set.card A) 5))
(assert (= (set.card B) 5))
(assert (not (= A B)))
-(assert (= (set.card (set.intersection A B)) 2))
+(assert (= (set.card (set.inter A B)) 2))
(assert (= (set.card (set.minus A B)) 3))
(assert (= (set.card (set.minus B A)) 3))
(assert (= universe (as set.universe (Set (_ BitVec 3)))))
(assert (= (set.card A) 3))
(assert (= (set.card B) 3))
(assert (not (= A B)))
-(assert (= (set.card (set.intersection A B)) 1))
+(assert (= (set.card (set.inter A B)) 1))
(assert (= (set.card (set.minus A B)) 2))
(assert (= (set.card (set.minus B A)) 2))
(assert (not (set.member x A)))
(assert (= (set.card A) 5))
(assert (= (set.card B) 5))
(assert (not (= A B)))
-(assert (= (set.card (set.intersection A B)) 2))
+(assert (= (set.card (set.inter A B)) 2))
(assert (= (set.card (set.minus A B)) 3))
(assert (= (set.card (set.minus B A)) 3))
(assert (= universe (as set.universe (Set (_ BitVec 3)))))
(declare-fun x () Rec)
(assert (= (set.card A) 5))
(assert (= (set.card B) 5))
-(assert (= (set.card (set.intersection A B)) 1))
+(assert (= (set.card (set.inter A B)) 1))
(assert (= universe (as set.universe (Set Rec))))
(check-sat)
(declare-fun universe () (Set Rec))
(assert (= (set.card A) 9))
(assert (= (set.card B) 9))
-(assert (= (set.card (set.intersection A B)) 1))
+(assert (= (set.card (set.inter A B)) 1))
(assert (= universe (as set.universe (Set Rec))))
(check-sat)
(let ((e14 (set.minus v2 v2)))
(let ((e15 (f1 v1 v4 v1)))
(let ((e16 (f1 e14 v1 v4)))
-(let ((e17 (set.intersection e16 e15)))
+(let ((e17 (set.inter e16 e15)))
(let ((e18 (f1 v4 e15 v2)))
(let ((e19 (ite (p1 e13) (set.singleton 1) (set.singleton 0))))
(let ((e20 (set.member v0 e17)))
(let ((e16 (set.minus v2 v1)))
(let ((e17 (set.minus v1 v2)))
(let ((e18 (set.union e17 e17)))
-(let ((e19 (set.intersection e17 v1)))
-(let ((e20 (set.intersection e17 e18)))
-(let ((e21 (set.intersection v1 e16)))
+(let ((e19 (set.inter e17 v1)))
+(let ((e20 (set.inter e17 e18)))
+(let ((e21 (set.inter v1 e16)))
(let ((e22 (set.minus e20 e16)))
(let ((e23 (ite (p1 v2 e18 e21) (set.singleton 1) (set.singleton 0))))
(let ((e24 (set.minus e17 e23)))
(let ((e10 (f0 v0 e8 e8)))
(let ((e11 (ite (p1 v1) (set.singleton 1) (set.singleton 0))))
(let ((e12 (set.union v3 v3)))
-(let ((e13 (set.intersection v3 v1)))
+(let ((e13 (set.inter v3 v1)))
(let ((e14 (ite (p1 v3) (set.singleton 1) (set.singleton 0))))
-(let ((e15 (set.intersection v2 e14)))
+(let ((e15 (set.inter v2 e14)))
(let ((e16 (ite (p1 e11) (set.singleton 1) (set.singleton 0))))
(let ((e17 (ite (p1 v4) (set.singleton 1) (set.singleton 0))))
(let ((e18 (set.union e15 v2)))
(let ((e19 (ite (p1 e16) (set.singleton 1) (set.singleton 0))))
-(let ((e20 (set.intersection e18 v3)))
+(let ((e20 (set.inter e18 v3)))
(let ((e21 (set.minus v4 e12)))
(let ((e22 (set.union v3 v2)))
(let ((e23 (set.minus e12 v4)))
(let ((e24 (set.minus v3 e16)))
-(let ((e25 (set.intersection e19 e20)))
+(let ((e25 (set.inter e19 e20)))
(let ((e26 (ite (p1 e15) (set.singleton 1) (set.singleton 0))))
(let ((e27 (set.minus e17 e15)))
(let ((e28 (f1 e23 e12)))
(assert (= (set.card universe) 3))
(assert (= (set.card A) 2))
(assert (= (set.card B) 2))
-(assert (= (set.intersection A B) (as set.empty (Set (Array Int Int)))))
+(assert (= (set.inter A B) (as set.empty (Set (Array Int Int)))))
(assert (= universe (as set.universe (Set (Array Int Int)))))
(check-sat)
(assert (= (set.card universe) 3))
(assert (= (set.card A) 1))
(assert (= (set.card B) 2))
-(assert (= (set.intersection A B) (as set.empty (Set (Array Int Int)))))
+(assert (= (set.inter A B) (as set.empty (Set (Array Int Int)))))
(assert (= universe (as set.universe (Set (Array Int Int)))))
(check-sat)
(declare-const B (Set Int))
(assert (= (set.card A) 6))
(assert (= (set.card B) 5))
-(assert (= (set.intersection A B) (as set.empty (Set Int))))
+(assert (= (set.inter A B) (as set.empty (Set Int))))
(assert (= universe (as set.universe (Set Int))))
(check-sat)
(declare-const B (Set Int))
(assert (= (set.card A) 5))
(assert (= (set.card B) 5))
-(assert (= (set.intersection A B) (as set.empty (Set Int))))
+(assert (= (set.inter A B) (as set.empty (Set Int))))
(assert (= universe (as set.universe (Set Int))))
(check-sat)
(assert (! (not (set.member null$0 Alloc$0)) :named initial_footprint_of_insert_27_11_1))
(assert (! (or (= prev_2$0 curr_2$0)
- (set.member sk_?e_1$0 (set.intersection sk_?X_4$0 sk_?X_3$0))
+ (set.member sk_?e_1$0 (set.inter sk_?X_4$0 sk_?X_3$0))
(and (set.member sk_?e_1$0 sk_FP$0) (not (set.member sk_?e_1$0 FP$0)))
(and (set.member sk_?e$0 (set.union c1_2$0 c2_2$0)) (not (set.member sk_?e$0 content$0)))
(and (set.member sk_?e$0 c1_2$0)
(assert (> n (+ (* 2 f) m)))
-(assert (>= (set.card (set.minus UNIVERALSET (set.intersection (set.minus UNIVERALSET b) (set.minus UNIVERALSET c)))) n))
+(assert (>= (set.card (set.minus UNIVERALSET (set.inter (set.minus UNIVERALSET b) (set.minus UNIVERALSET c)))) n))
(check-sat)
(set-info :status unsat)
(declare-fun st1 () (Set Int))
(declare-fun st7 () (Set Int))
-(assert (> 0 (set.card (set.intersection st1 (set.union st7 st1)))))
+(assert (> 0 (set.card (set.inter st1 (set.union st7 st1)))))
(assert (set.subset st1 st7))
(check-sat)
(set-info :status unsat)
(declare-fun st3 () (Set String))
(declare-fun st9 () (Set String))
-(assert (set.is_singleton (set.intersection st3 st9)))
-(assert (< 1 (set.card (set.intersection st3 st9))))
+(assert (set.is_singleton (set.inter st3 st9)))
+(assert (< 1 (set.card (set.inter st3 st9))))
(assert (set.is_singleton st9))
(check-sat)
(assert (= (set.card b) d))
(assert (= (set.card c) 0))
(assert (= 0 (mod 0 d)))
-(assert (> (set.card (set.minus e (set.intersection (set.intersection e b) (set.minus e c)))) 1))
+(assert (> (set.card (set.minus e (set.inter (set.inter e b) (set.minus e c)))) 1))
(check-sat)
(define-fun smt_set_mem ((x Elt) (s mySet)) Bool (set.member x s))
(define-fun smt_set_add ((s mySet) (x Elt)) mySet (set.union s (set.singleton x)))
(define-fun smt_set_cup ((s1 mySet) (s2 mySet)) mySet (set.union s1 s2))
-(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.intersection s1 s2))
+(define-fun smt_set_cap ((s1 mySet) (s2 mySet)) mySet (set.inter s1 s2))
;(define-fun smt_set_com ((s mySet)) mySet ((_ map not) s))
(define-fun smt_set_dif ((s1 mySet) (s2 mySet)) mySet (set.minus s1 s2))
;(define-fun smt_set_sub ((s1 mySet) (s2 mySet)) Bool (= smt_set_emp (smt_set_dif s1 s2)))
(assert (! (= sk_?X_28$0 (lseg_domain$0 next$0 curr_3$0 null$0))
:named invariant_18_4_69))
-(assert (! (= (as set.empty SetLoc) (set.intersection sk_?X_27$0 sk_?X_28$0))
+(assert (! (= (as set.empty SetLoc) (set.inter sk_?X_27$0 sk_?X_28$0))
:named invariant_18_4_70))
(assert (! (= Alloc$0 (set.union FP_Caller$0 Alloc$0))
(assert (! (= FP_2$0
(set.union (set.minus FP$0 FP_1$0)
- (set.union (set.intersection Alloc$0 FP_1$0) (set.minus Alloc$0 Alloc$0))))
+ (set.union (set.inter Alloc$0 FP_1$0) (set.minus Alloc$0 Alloc$0))))
:named framecondition_of_remove_loop_18_4_17))
(assert (! (or (Btwn$0 next$0 lst$0 curr_2$0 curr_2$0)
(assert (! (= sk_?X_30$0 FP_1$0) :named invariant_18_4_74))
-(assert (! (= (as set.empty SetLoc) (set.intersection sk_?X_32$0 sk_?X_31$0))
+(assert (! (= (as set.empty SetLoc) (set.inter sk_?X_32$0 sk_?X_31$0))
:named invariant_18_4_75))
(assert (! (not (= curr_3$0 null$0)) :named invariant_18_4_76))
:named invariant_18_4_77))
(assert (! (= sk_?X_29$0
- (set.union (set.intersection Alloc$0 FP_1$0) (set.minus Alloc$0 Alloc$0)))
+ (set.union (set.inter Alloc$0 FP_1$0) (set.minus Alloc$0 Alloc$0)))
:named invariant_18_4_78))
(assert (! (= sk_?X_27$0 (lseg_domain$0 next$0 lst_1$0 curr_3$0))
(assert (set.subset A (set.insert g h i (set.singleton f))))
(assert (= C (set.minus A B) ))
(assert (set.subset B A))
-(assert (= C (set.intersection A B)))
+(assert (= C (set.inter A B)))
(assert (set.member j C))
(check-sat)
(declare-fun ic0_c () (Set myType))
(assert (forall ((r myType)) (=> (set.member r ic0_i) (forall ((r2 myType)) (=> (set.member r2 (neg (select d r))) (set.member r2 ic0_c))))))
(assert (set.subset (set.singleton A) ic0_i))
-(assert (or (exists ((e0 myType)) (=> (set.member e0 ic0_i) (set.subset (select l A) (select l e0)))) (set.subset (set.intersection ic0_i ic0_c) emptymyTypeSet)))
+(assert (or (exists ((e0 myType)) (=> (set.member e0 ic0_i) (set.subset (select l A) (select l e0)))) (set.subset (set.inter ic0_i ic0_c) emptymyTypeSet)))
(declare-fun ic1_i () (Set myType))
(declare-fun ic1_c () (Set myType))
(assert (forall ((r myType)) (=> (set.member r (pos (select d B))) (set.member r ic1_i))))
-(assert (or (exists ((e1 myType)) (=> (set.member e1 ic1_i) (set.subset (select l B) (select l e1)))) (set.subset (set.intersection ic1_i ic1_c) emptymyTypeSet)))
+(assert (or (exists ((e1 myType)) (=> (set.member e1 ic1_i) (set.subset (select l B) (select l e1)))) (set.subset (set.inter ic1_i ic1_c) emptymyTypeSet)))
(check-sat)