diff options
author | ajreynol <andrew.j.reynolds@gmail.com> | 2015-07-12 13:29:59 +0200 |
---|---|---|
committer | ajreynol <andrew.j.reynolds@gmail.com> | 2015-07-12 13:29:59 +0200 |
commit | 7943953741c67d8246f983e193d26812d959b4cd (patch) | |
tree | 6eb9877e9c75a6f41ea66c7914aecdd05e2d19e4 /src/theory/quantifiers | |
parent | 812506431184838f50944f963bb9279da5ff80ba (diff) |
Add option --full-saturate-quant-rd. Fix option --register-quant-body-terms.
Diffstat (limited to 'src/theory/quantifiers')
-rw-r--r-- | src/theory/quantifiers/inst_strategy_e_matching.cpp | 9 | ||||
-rw-r--r-- | src/theory/quantifiers/options | 2 | ||||
-rw-r--r-- | src/theory/quantifiers/term_database.cpp | 13 |
3 files changed, 15 insertions, 9 deletions
diff --git a/src/theory/quantifiers/inst_strategy_e_matching.cpp b/src/theory/quantifiers/inst_strategy_e_matching.cpp index 81771c374..8958034df 100644 --- a/src/theory/quantifiers/inst_strategy_e_matching.cpp +++ b/src/theory/quantifiers/inst_strategy_e_matching.cpp @@ -467,12 +467,13 @@ int InstStrategyFreeVariable::process( Node f, Theory::Effort effort, int e ){ }else{ //first, try from relevant domain RelevantDomain * rd = d_quantEngine->getRelevantDomain(); - for( unsigned r=0; r<2; r++ ){ - if( rd || r==1 ){ + unsigned rstart = options::fullSaturateQuantRd() ? 0 : 1; + for( unsigned r=rstart; r<2; r++ ){ + if( rd || r>0 ){ if( r==0 ){ Trace("inst-alg") << "-> Relevant domain instantiate " << f << "..." << std::endl; }else{ - Trace("inst-alg") << "-> Guess instantiate " << f << "..." << std::endl; + Trace("inst-alg") << "-> Ground term instantiate " << f << "..." << std::endl; } rd->compute(); unsigned final_max_i = 0; @@ -550,6 +551,7 @@ int InstStrategyFreeVariable::process( Node f, Theory::Effort effort, int e ){ } } if( r==0 ){ + //complete guess if( d_guessed.find( f )==d_guessed.end() ){ Trace("inst-alg") << "-> Guess instantiate " << f << "..." << std::endl; d_guessed[f] = true; @@ -561,6 +563,7 @@ int InstStrategyFreeVariable::process( Node f, Theory::Effort effort, int e ){ } } } + //term enumerator? } return STATUS_UNKNOWN; } diff --git a/src/theory/quantifiers/options b/src/theory/quantifiers/options index ce7f01328..391abe9eb 100644 --- a/src/theory/quantifiers/options +++ b/src/theory/quantifiers/options @@ -115,6 +115,8 @@ option eagerInstQuant --eager-inst-quant bool :default false option fullSaturateQuant --full-saturate-quant bool :default false when all other quantifier instantiation strategies fail, instantiate with ground terms from relevant domain, then arbitrary ground terms before answering unknown +option fullSaturateQuantRd --full-saturate-quant-rd bool :default true + whether to use relevant domain first for full saturation instantiation strategy option literalMatchMode --literal-matching=MODE CVC4::theory::quantifiers::LiteralMatchMode :default CVC4::theory::quantifiers::LITERAL_MATCH_NONE :include "theory/quantifiers/modes.h" :handler CVC4::theory::quantifiers::stringToLiteralMatchMode :handler-include "theory/quantifiers/options_handlers.h" :predicate CVC4::theory::quantifiers::checkLiteralMatchMode :predicate-include "theory/quantifiers/options_handlers.h" choose literal matching mode diff --git a/src/theory/quantifiers/term_database.cpp b/src/theory/quantifiers/term_database.cpp index 189866494..cc8ae4db0 100644 --- a/src/theory/quantifiers/term_database.cpp +++ b/src/theory/quantifiers/term_database.cpp @@ -129,11 +129,12 @@ void TermDb::addTerm( Node n, std::set< Node >& added, bool withinQuant, bool wi bool rec = false; if( d_processed.find( n )==d_processed.end() ){ d_processed.insert(n); - d_type_map[ n.getType() ].push_back( n ); - //if this is an atomic trigger, consider adding it - //Call the children? - if( inst::Trigger::isAtomicTrigger( n ) ){ - if( !TermDb::hasInstConstAttr(n) ){ + if( !TermDb::hasInstConstAttr(n) ){ + Trace("term-db-debug") << "register term : " << n << std::endl; + d_type_map[ n.getType() ].push_back( n ); + //if this is an atomic trigger, consider adding it + //Call the children? + if( inst::Trigger::isAtomicTrigger( n ) ){ Trace("term-db") << "register term in db " << n << std::endl; Node op = getOperator( n ); /* @@ -166,7 +167,7 @@ void TermDb::addTerm( Node n, std::set< Node >& added, bool withinQuant, bool wi d_iclosure_processed.insert( n ); rec = true; } - if( rec ){ + if( rec && n.getKind()!=FORALL ){ for( size_t i=0; i<n.getNumChildren(); i++ ){ addTerm( n[i], added, withinQuant, withinInstClosure ); } |