summaryrefslogtreecommitdiff
path: root/src/theory
diff options
context:
space:
mode:
authorajreynol <andrew.j.reynolds@gmail.com>2016-07-28 11:21:59 -0500
committerajreynol <andrew.j.reynolds@gmail.com>2016-07-28 11:22:08 -0500
commit4b0f7836db3bb6a2a0e912aeae1cd87f1823cfa8 (patch)
treef2c009f917a15e067386952a410ad0204ba70dab /src/theory
parentb539fb0692680c16247e3aa6e150457dd265f834 (diff)
Fix bug 749.
Diffstat (limited to 'src/theory')
-rw-r--r--src/theory/quantifiers/quantifiers_rewriter.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/theory/quantifiers/quantifiers_rewriter.cpp b/src/theory/quantifiers/quantifiers_rewriter.cpp
index 7e896d358..963889a85 100644
--- a/src/theory/quantifiers/quantifiers_rewriter.cpp
+++ b/src/theory/quantifiers/quantifiers_rewriter.cpp
@@ -957,20 +957,27 @@ bool QuantifiersRewriter::computeVariableElimLit( Node lit, bool pol, std::vecto
Node veq_c;
Node val;
int ires = QuantArith::isolate( itm->first, msum, veq_c, val, lit.getKind() );
- if( ires!=0 && veq_c.isNull() && isVariableElim( itm->first, val ) ){
+ if( ires!=0 && veq_c.isNull() ){
bool is_upper = pol!=( ires==1 );
Trace("var-elim-ineq-debug") << lit << " is a " << ( is_upper ? "upper" : "lower" ) << " bound for " << itm->first << std::endl;
Trace("var-elim-ineq-debug") << " pol/ires = " << pol << " " << ires << std::endl;
num_bounds[itm->first][is_upper][lit] = pol;
+ }else{
+ Trace("var-elim-ineq-debug") << "...ineligible " << itm->first << " since it cannot be solved for (" << ires << ", " << veq_c << ")." << std::endl;
+ num_bounds[itm->first][true].clear();
+ num_bounds[itm->first][false].clear();
}
}
}else{
- //compute variables in itm->first, these are not eligible for elimination
- std::vector< Node > bvs;
- TermDb::getBoundVars( itm->first, bvs );
- for( unsigned j=0; j<bvs.size(); j++ ){
- num_bounds[bvs[j]][true].clear();
- num_bounds[bvs[j]][false].clear();
+ if( lit.getKind()==GEQ || lit.getKind()==GT ){
+ //compute variables in itm->first, these are not eligible for elimination
+ std::vector< Node > bvs;
+ TermDb::getBoundVars( itm->first, bvs );
+ for( unsigned j=0; j<bvs.size(); j++ ){
+ Trace("var-elim-ineq-debug") << "...ineligible " << bvs[j] << " since it is contained in monomial." << std::endl;
+ num_bounds[bvs[j]][true].clear();
+ num_bounds[bvs[j]][false].clear();
+ }
}
}
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback