}
Node NodeManager::mkNullaryOperator(const TypeNode& type, Kind k) {
- //FIXME : this is not correct for multitheading
std::map< TypeNode, Node >::iterator it = d_unique_vars[k].find( type );
if( it==d_unique_vars[k].end() ){
Node n = NodeBuilder<0>(this, k).constructNode();
//setAttribute(n, TypeCheckedAttr(), true);
d_unique_vars[k][type] = n;
Assert( n.getMetaKind() == kind::metakind::NULLARY_OPERATOR );
- Trace("ajr-temp") << this << "...made nullary operator " << n << " " << &n << " " << type << std::endl;
return n;
}else{
- Trace("ajr-temp") << this << "...reuse nullary operator " << it->second << " " << &( it->second ) << std::endl;
return it->second;
}
}
Node r2 = it2->first;
//see if there are members in second argument
std::map< Node, std::map< Node, Node > >::iterator itm2 = d_pol_mems[0].find( r2 );
+ std::map< Node, std::map< Node, Node > >::iterator itm2n = d_pol_mems[1].find( r2 );
if( itm2!=d_pol_mems[0].end() || k!=kind::INTERSECTION ){
Trace("sets-debug") << "Checking " << it2->second << ", members = " << (itm1!=d_pol_mems[0].end()) << ", " << (itm2!=d_pol_mems[0].end()) << std::endl;
//for all members of r1
addEqualityToExp( it2->second[1], itm2->second[xr][1], exp );
addEqualityToExp( x, itm2->second[xr][0], exp );
valid = true;
+ }else{
+ // if not, check whether it is definitely not a member, if unknown, split
+ bool not_in_r2 = itm2n!=d_pol_mems[1].end() && itm2n->second.find( xr )!=itm2->second.end();
+ if( !not_in_r2 ){
+ exp.push_back( NodeManager::currentNM()->mkNode( kind::MEMBER, x, it2->second[1] ) );
+ valid = true;
+ inferType = 1;
+ }
}
}else{
Assert( k==kind::SETMINUS );
}
}
if( hasCareArg ){
+ Trace("sets-cg-debug") << "......adding." << std::endl;
index[tn].addTerm( f1, reps );
arity = reps.size();
+ }else{
+ Trace("sets-cg-debug") << "......skip." << std::endl;
}
}
if( arity>0 ){
--- /dev/null
+% EXPECT: sat
+OPTION "logic" "ALL_SUPPORTED";
+IntPair: TYPE = [INT, INT];
+w : SET OF IntPair;
+z : SET OF IntPair;
+x : INT;
+y : INT;
+
+ASSERT (1,x) IS_IN w;
+ASSERT (y,2) IS_IN z;
+
+ASSERT NOT (1, 2) IS_IN ( w JOIN z );
+
+CHECKSAT;
--- /dev/null
+(set-logic ALL)
+(set-info :status sat)
+(declare-fun x () Int)
+(declare-fun y () Int)
+(declare-fun A () (Set Int))
+(declare-fun B () (Set Int))
+(declare-fun C () (Set Int))
+(declare-fun D () (Set Int))
+
+(assert (member x A))
+(assert (member y B))
+(assert (or (= C (intersection A B)) (= D (intersection A B))))
+
+
+(check-sat)