summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers
diff options
context:
space:
mode:
Diffstat (limited to 'src/theory/quantifiers')
-rw-r--r--src/theory/quantifiers/first_order_model.cpp16
-rw-r--r--src/theory/quantifiers/first_order_model.h2
-rw-r--r--src/theory/quantifiers/quant_split.cpp2
3 files changed, 13 insertions, 7 deletions
diff --git a/src/theory/quantifiers/first_order_model.cpp b/src/theory/quantifiers/first_order_model.cpp
index 9e29e21aa..b6743724b 100644
--- a/src/theory/quantifiers/first_order_model.cpp
+++ b/src/theory/quantifiers/first_order_model.cpp
@@ -62,7 +62,7 @@ unsigned FirstOrderModel::getNumAssertedQuantifiers() {
}
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() );
@@ -148,9 +148,9 @@ void FirstOrderModel::reset_round() {
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++ ){
@@ -179,6 +179,10 @@ void FirstOrderModel::reset_round() {
}
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] );
+ }
}
}
@@ -203,10 +207,6 @@ int FirstOrderModel::getRelevanceValue( Node q ) {
}
}
-//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;
}
@@ -220,6 +220,10 @@ bool FirstOrderModel::isQuantifierActive( TNode q ) {
}
}
+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) {
diff --git a/src/theory/quantifiers/first_order_model.h b/src/theory/quantifiers/first_order_model.h
index 44ffd095a..7ded1b05d 100644
--- a/src/theory/quantifiers/first_order_model.h
+++ b/src/theory/quantifiers/first_order_model.h
@@ -113,6 +113,8 @@ public:
void setQuantifierActive( TNode q, bool active );
/** is quantified formula active */
bool isQuantifierActive( TNode q );
+ /** is quantified formula asserted */
+ bool isQuantifierAsserted( TNode q );
};/* class FirstOrderModel */
diff --git a/src/theory/quantifiers/quant_split.cpp b/src/theory/quantifiers/quant_split.cpp
index 24d26e72f..63935f170 100644
--- a/src/theory/quantifiers/quant_split.cpp
+++ b/src/theory/quantifiers/quant_split.cpp
@@ -89,7 +89,7 @@ void QuantDSplit::check( Theory::Effort e, unsigned quant_e ) {
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;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback