// (not y) => (not x)
// (not z) => x
std::set<Node>::const_iterator ci = negtimp.begin(), cend = negtimp.end();
- for(; ci != cend; ci++){
+ for (; ci != cend; ++ci)
+ {
Node impliedByNotTB = *ci;
Node impliedByNotTBNeg = impliedByNotTB.negate();
if(negfimp.find(impliedByNotTBNeg) != negfimp.end()){
ArrayInfo::~ArrayInfo() {
CNodeInfoMap::iterator it = info_map.begin();
- for( ; it != info_map.end(); it++ ) {
+ for (; it != info_map.end(); ++it)
+ {
if((*it).second!= emptyInfo) {
delete (*it).second;
}
bool inList(const CTNodeList* l, const TNode el) {
CTNodeList::const_iterator it = l->begin();
- for ( ; it!= l->end(); it ++) {
+ for (; it != l->end(); ++it)
+ {
if(*it == el)
return true;
}
void printList (CTNodeList* list) {
CTNodeList::const_iterator it = list->begin();
Trace("arrays-info")<<" [ ";
- for(; it != list->end(); it++ ) {
+ for (; it != list->end(); ++it)
+ {
Trace("arrays-info")<<(*it)<<" ";
}
Trace("arrays-info")<<"] \n";
void printList (List<TNode>* list) {
List<TNode>::const_iterator it = list->begin();
Trace("arrays-info")<<" [ ";
- for(; it != list->end(); it++ ) {
+ for (; it != list->end(); ++it)
+ {
Trace("arrays-info")<<(*it)<<" ";
}
Trace("arrays-info")<<"] \n";
void ArrayInfo::mergeLists(CTNodeList* la, const CTNodeList* lb) const{
std::set<TNode> temp;
CTNodeList::const_iterator it;
- for(it = la->begin() ; it != la->end(); it++ ) {
+ for (it = la->begin(); it != la->end(); ++it)
+ {
temp.insert((*it));
}
- for(it = lb->begin() ; it!= lb->end(); it++ ) {
+ for (it = lb->begin(); it != lb->end(); ++it)
+ {
if(temp.count(*it) == 0) {
la->push_back(*it);
}
}else{
Trace("cbqi-inst-debug2") << "Revert substitutions..." << std::endl;
//revert substitution information
- for( std::map< int, Node >::iterator it = prev_subs.begin(); it != prev_subs.end(); it++ ){
+ for (std::map<int, Node>::iterator it = prev_subs.begin();
+ it != prev_subs.end();
+ ++it)
+ {
sf.d_subs[it->first] = it->second;
}
- for( std::map< int, TermProperties >::iterator it = prev_prop.begin(); it != prev_prop.end(); it++ ){
+ for (std::map<int, TermProperties>::iterator it = prev_prop.begin();
+ it != prev_prop.end();
+ ++it)
+ {
sf.d_props[it->first] = it->second;
}
for( unsigned i=0; i<new_non_basic.size(); i++ ){
for (std::unordered_set<Node, NodeHashFunction>::iterator set_it =
itec->second.begin();
set_it != itec->second.end();
- set_it++)
+ ++set_it)
{
if (std::find(consts.begin(), consts.end(), *set_it) == consts.end())
{
}
}
}
- m_it++;
+ ++m_it;
}
TERM_IT t_it = d_terms_cache.begin();
std::vector<Node>::iterator term_it = k_t_it->second.begin();
while(term_it != k_t_it->second.end()) {
computeMembersForBinOpRel( *term_it );
- 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() ) {
computeMembersForUnaryOpRel( *term_it );
- term_it++;
+ ++term_it;
}
} else if ( k_t_it->first == kind::TCLOSURE ) {
std::vector<Node>::iterator term_it = k_t_it->second.begin();
while( term_it != k_t_it->second.end() ) {
buildTCGraphForRel( *term_it );
- term_it++;
+ ++term_it;
}
} else if( k_t_it->first == kind::JOIN_IMAGE ) {
std::vector<Node>::iterator term_it = k_t_it->second.begin();
while( term_it != k_t_it->second.end() ) {
computeMembersForJoinImageTerm( *term_it );
- term_it++;
+ ++term_it;
}
} else if( k_t_it->first == kind::IDEN ) {
std::vector<Node>::iterator term_it = k_t_it->second.begin();
while( term_it != k_t_it->second.end() ) {
computeMembersForIdenTerm( *term_it );
- term_it++;
+ ++term_it;
}
}
- k_t_it++;
+ ++k_t_it;
}
}
- t_it++;
+ ++t_it;
}
doTCInference();
if( hasSeen.find(*set_it) == hasSeen.end() ) {
isTCReachable( *set_it, dest, hasSeen, tc_graph, isReachable );
}
- set_it++;
+ ++set_it;
}
}
}
void TheorySetsRels::doTCInference( std::map< Node, std::unordered_set<Node, NodeHashFunction> > rel_tc_graph, std::map< Node, Node > rel_tc_graph_exps, Node tc_rel ) {
Trace("rels-debug") << "[Theory::Rels] ****** doTCInference !" << std::endl;
- for( TC_GRAPH_IT tc_graph_it = rel_tc_graph.begin(); tc_graph_it != rel_tc_graph.end(); tc_graph_it++ ) {
- for( std::unordered_set< Node, NodeHashFunction >::iterator snd_elements_it = tc_graph_it->second.begin();
- snd_elements_it != tc_graph_it->second.end(); snd_elements_it++ ) {
+ for (TC_GRAPH_IT tc_graph_it = rel_tc_graph.begin();
+ tc_graph_it != rel_tc_graph.end();
+ ++tc_graph_it)
+ {
+ for (std::unordered_set<Node, NodeHashFunction>::iterator
+ snd_elements_it = tc_graph_it->second.begin();
+ snd_elements_it != tc_graph_it->second.end();
+ ++snd_elements_it)
+ {
std::vector< Node > reasons;
std::unordered_set<Node, NodeHashFunction> seen;
Node tuple = RelsUtils::constructPair( tc_rel, getRepresentative( tc_graph_it->first ), getRepresentative( *snd_elements_it) );
seen.insert( cur_node_rep );
TC_GRAPH_IT cur_set = tc_graph.find( cur_node_rep );
if( cur_set != tc_graph.end() ) {
- for( std::unordered_set< Node, NodeHashFunction >::iterator set_it = cur_set->second.begin();
- set_it != cur_set->second.end(); set_it++ ) {
+ for (std::unordered_set<Node, NodeHashFunction>::iterator set_it =
+ cur_set->second.begin();
+ set_it != cur_set->second.end();
+ ++set_it)
+ {
Node new_pair = RelsUtils::constructPair( tc_rel, cur_node_rep, *set_it );
std::vector< Node > new_reasons( reasons );
new_reasons.push_back( rel_tc_graph_exps.find( new_pair )->second );
while( tc_graph_it != d_tcr_tcGraph.end() ) {
Assert ( d_tcr_tcGraph_exps.find(tc_graph_it->first) != d_tcr_tcGraph_exps.end() );
doTCInference( tc_graph_it->second, d_tcr_tcGraph_exps.find(tc_graph_it->first)->second, tc_graph_it->first );
- tc_graph_it++;
+ ++tc_graph_it;
}
Trace("rels-debug") << "[Theory::Rels] ****** Done with finalizing transitive closure inferences!" << std::endl;
}
}
bool TheorySetsRels::hasTerm(Node a) { return d_ee.hasTerm(a); }
-
bool TheorySetsRels::areEqual( Node a, Node b ){
Assert(a.getType() == b.getType());
Trace("rels-eq") << "[sets-rels]**** checking equality between " << a << " and " << b << std::endl;
if(areEqual(*mems, member)) {
return false;
}
- mems++;
+ ++mems;
}
map[rel_rep].push_back(member);
return true;
it = d_data.begin();
while(it != d_data.end()) {
nodes.push_back(it->first);
- it++;
+ ++it;
}
}
return nodes;
it = d_data.begin();
while(it != d_data.end()) {
nodes.push_back(it->first);
- it++;
+ ++it;
}
return nodes;
}else{
while(tuple_it != tuple_set.end()) {
new_tuple_set.insert(RelsUtils::reverseTuple(*tuple_it));
- tuple_it++;
+ ++tuple_it;
}
Node new_node = NormalForm::elementsToSet(new_tuple_set, node.getType());
Assert(new_node.isConst());
new_tuple.insert(new_tuple.end(), right_tuple.begin(), right_tuple.end());
Node composed_tuple = NodeManager::currentNM()->mkNode(kind::APPLY_CONSTRUCTOR, new_tuple);
new_tuple_set.insert(composed_tuple);
- right_it++;
+ ++right_it;
}
- left_it++;
+ ++left_it;
}
Node new_node = NormalForm::elementsToSet(new_tuple_set, node.getType());
Assert(new_node.isConst());
Node composed_tuple = NodeManager::currentNM()->mkNode(kind::APPLY_CONSTRUCTOR, new_tuple);
new_tuple_set.insert(composed_tuple);
}
- right_it++;
+ ++right_it;
}
- left_it++;
+ ++left_it;
}
Node new_node = NormalForm::elementsToSet(new_tuple_set, node.getType());
Assert(new_node.isConst());
Trace("regexp-fset") << "END FSET(" << mkString(r) << ") = {";
for (std::set<unsigned>::const_iterator itr = pcset.begin();
itr != pcset.end();
- itr++)
+ ++itr)
{
if (itr != pcset.begin())
{
Trace("regexp-int-debug") << "Try CSET(" << cset.size() << ") = {";
for (std::vector<unsigned>::const_iterator itr = cset.begin();
itr != cset.end();
- itr++)
+ ++itr)
{
//CVC4::String c( *itr );
if(itr != cset.begin()) {
std::map< PairNodes, Node > cacheX;
for (std::vector<unsigned>::const_iterator itr = cset.begin();
itr != cset.end();
- itr++)
+ ++itr)
{
std::vector<unsigned> cvec;
cvec.push_back(String::convertCodeToUnsignedInt(*itr));