summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/inst_strategy_cbqi.cpp
diff options
context:
space:
mode:
authorajreynol <andrew.j.reynolds@gmail.com>2015-08-25 17:53:17 +0200
committerajreynol <andrew.j.reynolds@gmail.com>2015-08-25 17:53:17 +0200
commitd9c22c34d122a34d8a8a914936d9186be9a638fe (patch)
tree1228b16f08592f46e1424f3953f212e7a2d89cfd /src/theory/quantifiers/inst_strategy_cbqi.cpp
parent3a358738071a330efda34671655979edf1d6d875 (diff)
Use zero in cbqi when not using infinities.
Diffstat (limited to 'src/theory/quantifiers/inst_strategy_cbqi.cpp')
-rw-r--r--src/theory/quantifiers/inst_strategy_cbqi.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/theory/quantifiers/inst_strategy_cbqi.cpp b/src/theory/quantifiers/inst_strategy_cbqi.cpp
index 3d33f01ca..ddf032ac1 100644
--- a/src/theory/quantifiers/inst_strategy_cbqi.cpp
+++ b/src/theory/quantifiers/inst_strategy_cbqi.cpp
@@ -419,6 +419,7 @@ bool CegInstantiator::addInstantiation( std::vector< Node >& subs, std::vector<
}
if( options::cbqiModel() ){
if( pvtn.isInteger() || pvtn.isReal() ){
+ bool use_inf = d_use_vts_inf && ( pvtn.isInteger() ? options::cbqiUseInfInt() : options::cbqiUseInfReal() );
bool upper_first = false;
if( options::cbqiMinBounds() ){
upper_first = mbp_bounds[1].size()<mbp_bounds[0].size();
@@ -429,7 +430,7 @@ bool CegInstantiator::addInstantiation( std::vector< Node >& subs, std::vector<
for( unsigned r=0; r<2; r++ ){
int rr = upper_first ? (1-r) : r;
if( mbp_bounds[rr].empty() ){
- if( d_use_vts_inf && ( pvtn.isInteger() ? options::cbqiUseInfInt() : options::cbqiUseInfReal() ) ){
+ if( use_inf ){
Trace("cbqi-bound") << "No " << ( rr==0 ? "lower" : "upper" ) << " bounds for " << pv << " (type=" << pvtn << ")" << std::endl;
//no bounds, we do +- infinity
Node val = d_qe->getTermDatabase()->getVtsInfinity( pvtn );
@@ -540,6 +541,23 @@ bool CegInstantiator::addInstantiation( std::vector< Node >& subs, std::vector<
}
}
}
+ //if not using infinity, use model value of zero
+ if( !use_inf && mbp_bounds[0].empty() && mbp_bounds[1].empty() ){
+ Node val = d_zero;
+ Node c; //null (one) coefficient
+ val = getModelBasedProjectionValue( val, true, c, pv_value, d_zero, theta, Node::null(), vts_sym[0], Node::null(), vts_sym[1] );
+ if( !val.isNull() ){
+ if( subs_proc[val].find( c )==subs_proc[val].end() ){
+ subs_proc[val][c] = true;
+ if( addInstantiationInc( val, pv, c, subs, vars, coeff, has_coeff, theta, i, effort ) ){
+ return true;
+ }
+ }
+ }
+ }
+#ifdef MBP_STRICT_ASSERTIONS
+ Assert( false );
+#endif
//try non-optimal bounds (heuristic, may help when nested quantification) ?
Trace("cbqi-bound") << "Try non-optimal bounds..." << std::endl;
for( unsigned r=0; r<2; r++ ){
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback