summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorajreynol <andrew.j.reynolds@gmail.com>2015-07-12 13:29:59 +0200
committerajreynol <andrew.j.reynolds@gmail.com>2015-07-12 13:29:59 +0200
commit7943953741c67d8246f983e193d26812d959b4cd (patch)
tree6eb9877e9c75a6f41ea66c7914aecdd05e2d19e4 /src
parent812506431184838f50944f963bb9279da5ff80ba (diff)
Add option --full-saturate-quant-rd. Fix option --register-quant-body-terms.
Diffstat (limited to 'src')
-rw-r--r--src/theory/quantifiers/inst_strategy_e_matching.cpp9
-rw-r--r--src/theory/quantifiers/options2
-rw-r--r--src/theory/quantifiers/term_database.cpp13
-rw-r--r--src/theory/quantifiers_engine.cpp2
4 files changed, 17 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 );
}
diff --git a/src/theory/quantifiers_engine.cpp b/src/theory/quantifiers_engine.cpp
index 347aa83c4..9f8f0d6cf 100644
--- a/src/theory/quantifiers_engine.cpp
+++ b/src/theory/quantifiers_engine.cpp
@@ -304,6 +304,7 @@ void QuantifiersEngine::check( Theory::Effort e ){
Trace("quant-engine-debug") << " lemmas waiting = " << d_lemmas_waiting.size() << std::endl;
}
Trace("quant-engine-debug") << " Theory engine finished : " << !d_te->needCheck() << std::endl;
+ Trace("quant-engine-debug") << " Needs model effort : " << needsModelE << std::endl;
Trace("quant-engine-debug") << "Resetting all modules..." << std::endl;
}
if( Trace.isOn("quant-engine-ee") ){
@@ -536,6 +537,7 @@ void QuantifiersEngine::assertQuantifier( Node f, bool pol ){
for( int i=0; i<(int)d_modules.size(); i++ ){
d_modules[i]->assertNode( f );
}
+ addTermToDatabase( d_term_db->getInstConstantBody( f ), true );
}
}
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback