diff options
author | ajreynol <andrew.j.reynolds@gmail.com> | 2016-07-26 17:55:09 -0500 |
---|---|---|
committer | ajreynol <andrew.j.reynolds@gmail.com> | 2016-07-26 17:55:16 -0500 |
commit | 4cff52d94318646415fe89dfe3b97750451eb7c1 (patch) | |
tree | 2bc60458c4ac8075ffc3ffe74175b5e76136dd1a /src/theory/quantifiers_engine.cpp | |
parent | e6d75ab22dfb56df202b916ecd9b4327f931c782 (diff) |
Add option to minimize sygus solutions based on using weakest implicants of instantiations in unsat cores.
Diffstat (limited to 'src/theory/quantifiers_engine.cpp')
-rw-r--r-- | src/theory/quantifiers_engine.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/theory/quantifiers_engine.cpp b/src/theory/quantifiers_engine.cpp index 2975d2e70..75d177fdc 100644 --- a/src/theory/quantifiers_engine.cpp +++ b/src/theory/quantifiers_engine.cpp @@ -1307,6 +1307,21 @@ bool QuantifiersEngine::getUnsatCoreLemmas( std::vector< Node >& active_lemmas ) } } +bool QuantifiersEngine::getUnsatCoreLemmas( std::vector< Node >& active_lemmas, std::map< Node, Node >& weak_imp ) { + if( getUnsatCoreLemmas( active_lemmas ) ){ + for (unsigned i = 0; i < active_lemmas.size(); ++i) { + Node n = ProofManager::currentPM()->getWeakestImplicantInUnsatCore(active_lemmas[i]); + if( n!=active_lemmas[i] ){ + Trace("inst-unsat-core") << " weaken : " << active_lemmas[i] << " -> " << n << std::endl; + } + weak_imp[active_lemmas[i]] = n; + } + return true; + }else{ + return false; + } +} + void QuantifiersEngine::getExplanationForInstLemmas( std::vector< Node >& lems, std::map< Node, Node >& quant, std::map< Node, std::vector< Node > >& tvec ) { if( d_trackInstLemmas ){ if( options::incrementalSolving() ){ |