}
Node FirstOrderModel::getAssertedQuantifier( unsigned i, bool ordered ) {
- if( !ordered || d_forall_rlv_assert.empty() ){
+ if( !ordered ){
return d_forall_asserts[i];
}else{
Assert( d_forall_rlv_assert.size()==d_forall_asserts.size() );
d_quant_active.clear();
//order the quantified formulas
+ d_forall_rlv_assert.clear();
if( !d_forall_rlv_vec.empty() ){
Trace("fm-relevant") << "Build sorted relevant list..." << std::endl;
- d_forall_rlv_assert.clear();
Trace("fm-relevant-debug") << "Mark asserted quantified formulas..." << std::endl;
std::map< Node, bool > qassert;
for( unsigned i=0; i<d_forall_asserts.size(); i++ ){
}
Trace("fm-relevant-debug") << "Sizes : " << d_forall_rlv_assert.size() << " " << d_forall_asserts.size() << std::endl;
Assert( d_forall_rlv_assert.size()==d_forall_asserts.size() );
+ }else{
+ for( unsigned i=0; i<d_forall_asserts.size(); i++ ){
+ d_forall_rlv_assert.push_back( d_forall_asserts[i] );
+ }
}
}
}
}
-//bool FirstOrderModel::isQuantifierAsserted( TNode q ) {
-// return d_forall_asserts.find( q )!=d_forall_asserts.end();
-//}
-
void FirstOrderModel::setQuantifierActive( TNode q, bool active ) {
d_quant_active[q] = active;
}
}
}
+bool FirstOrderModel::isQuantifierAsserted( TNode q ) {
+ Assert( d_forall_rlv_assert.size()==d_forall_asserts.size() );
+ return std::find( d_forall_rlv_assert.begin(), d_forall_rlv_assert.end(), q )!=d_forall_rlv_assert.end();
+}
FirstOrderModelIG::FirstOrderModelIG(QuantifiersEngine * qe, context::Context* c, std::string name) :
FirstOrderModel(qe, c,name) {
void setQuantifierActive( TNode q, bool active );
/** is quantified formula active */
bool isQuantifierActive( TNode q );
+ /** is quantified formula asserted */
+ bool isQuantifierAsserted( TNode q );
};/* class FirstOrderModel */
std::vector< Node > lemmas;
for(std::map< Node, int >::iterator it = d_quant_to_reduce.begin(); it != d_quant_to_reduce.end(); ++it) {
Node q = it->first;
- if( d_quantEngine->getModel()->isQuantifierActive( q ) ){
+ if( d_quantEngine->getModel()->isQuantifierAsserted( q ) && d_quantEngine->getModel()->isQuantifierActive( q ) ){
if( d_added_split.find( q )==d_added_split.end() ){
d_added_split.insert( q );
std::vector< Node > bvs;
EqcInfo* t2_ei = getOrMakeEqcInfo(t2);
if(t1_ei != NULL && t2_ei != NULL) {
- // PT(t1) = PT(t2) -> t1 = t2;
- if(!t1_ei->d_pt.get().isNull() && !t2_ei->d_pt.get().isNull()) {
- sendInferProduct( true, t1_ei->d_pt.get(), t2_ei->d_pt.get(), explain(NodeManager::currentNM()->mkNode(kind::EQUAL,t1, t2)) );
- }
// Apply Product rule on (non)members of t2 and t1->pt
if(!t1_ei->d_pt.get().isNull()) {
for(NodeSet::key_iterator itr = t2_ei->d_mem.key_begin(); itr != t2_ei->d_mem.key_end(); itr++) {