KIND_TERM_IT k_t_it = t_it->second.begin();
while(k_t_it != t_it->second.end()) {
- if(k_t_it->first == Kind::JOIN) {
- std::vector<Node>::iterator join_term_it = k_t_it->second.begin();
- while(join_term_it != k_t_it->second.end()) {
- computeMembersForRel(*join_term_it);
- join_term_it++;
+ if(k_t_it->first == Kind::JOIN || k_t_it->first == Kind::PRODUCT) {
+ std::vector<Node>::iterator term_it = k_t_it->second.begin();
+ while(term_it != k_t_it->second.end()) {
+ computeMembersForRel(*term_it);
+ term_it++;
+ }
+ } else if ( k_t_it->first == Kind::TRANSPOSE ) {
+ std::vector<Node>::iterator term_it = k_t_it->second.begin();
+ while(term_it != k_t_it->second.end()) {
+ computeMembersForTpRel(*term_it);
+ term_it++;
}
}
k_t_it++;
Trace("rels-debug") << "\n[sets-rels] computeJoinOrProductRelations for relation " << n << std::endl;
switch(n[0].getKind()) {
case kind::TRANSPOSE:
- computeTpRel(n[0]);
+ computeMembersForTpRel(n[0]);
break;
case kind::JOIN:
case kind::PRODUCT:
switch(n[1].getKind()) {
case kind::TRANSPOSE:
- computeTpRel(n[1]);
+ computeMembersForTpRel(n[1]);
break;
case kind::JOIN:
case kind::PRODUCT:
composeTupleMemForRel(n);
}
- void TheorySetsRels::computeTpRel(Node n) {
+ void TheorySetsRels::computeMembersForTpRel(Node n) {
switch(n[0].getKind()) {
case kind::TRANSPOSE:
- computeTpRel(n[0]);
+ computeMembersForTpRel(n[0]);
break;
case kind::JOIN:
case kind::PRODUCT:
void applyTCRule( Node, Node );
std::map< Node, std::hash_set< Node, NodeHashFunction > > constructTCGraph( Node, Node, Node );
void computeMembersForRel( Node );
- void computeTpRel( Node );
+ void computeMembersForTpRel( Node );
void finalizeTCInference();
void inferTC( Node, std::map< Node, std::hash_set< Node, NodeHashFunction > >& );
void inferTC( Node, Node, std::map< Node, std::hash_set< Node, NodeHashFunction > >&,