i_ag->setGenerateAdditional( true );
addInstStrategy( i_ag );
//addInstStrategy( new InstStrategyAddFailSplits( this, ie ) );
- if( !options::finiteModelFind() ){
+ if( !options::finiteModelFind() && options::fullSaturateQuant() ){
addInstStrategy( new InstStrategyFreeVariable( d_quantEngine ) );
}
//d_isup->setPriorityOver( i_ag );
QuantifiersModule( qe ){
Trace("model-engine-debug") << "Initialize model engine, mbqi : " << options::mbqiMode() << " " << options::fmfBoundInt() << std::endl;
- if( options::mbqiMode()==MBQI_FMC || options::mbqiMode()==quantifiers::MBQI_FMC_INTERVAL || options::fmfBoundInt() ){
+ if( options::mbqiMode()==MBQI_FMC || options::mbqiMode()==quantifiers::MBQI_FMC_INTERVAL ||
+ options::mbqiMode()==MBQI_TRUST || options::fmfBoundInt() ){
Trace("model-engine-debug") << "...make fmc builder." << std::endl;
d_builder = new fmcheck::FullModelChecker( c, qe );
}else if( options::mbqiMode()==MBQI_INTERVAL ){
}
Trace("model-engine-debug") << "Do exhaustive instantiation..." << std::endl;
- int e_max = options::mbqiMode()==MBQI_FMC || options::mbqiMode()==MBQI_FMC_INTERVAL ? 2 : 1;
+ int e_max = options::mbqiMode()==MBQI_FMC || options::mbqiMode()==MBQI_FMC_INTERVAL ? 2 : ( options::mbqiMode()==MBQI_TRUST ? 0 : 1 );
for( int e=0; e<e_max; e++) {
if (d_addedLemmas==0) {
for( int i=0; i<fm->getNumAssertedQuantifiers(); i++ ){
MBQI_FMC_INTERVAL,
/** mbqi with interval abstraction of uninterpreted sorts */
MBQI_INTERVAL,
+ /** mbqi trust (produce no instantiations) */
+ MBQI_TRUST,
} MbqiMode;
typedef enum {
option eagerInstQuant --eager-inst-quant bool :default false
apply quantifier instantiation eagerly
+
+option fullSaturateQuant --full-saturate-quant bool :default true
+ when all other quantifier instantiation strategies fail, instantiate with ground terms from relevant domain, then arbitrary ground terms before answering unknown
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
return MBQI_FMC_INTERVAL;
} else if(optarg == "interval") {
return MBQI_INTERVAL;
+ } else if(optarg == "trust") {
+ return MBQI_TRUST;
} else if(optarg == "help") {
puts(mbqiModeHelp.c_str());
exit(1);
//the model object
if( options::mbqiMode()==quantifiers::MBQI_FMC ||
- options::mbqiMode()==quantifiers::MBQI_FMC_INTERVAL || options::fmfBoundInt() ){
+ options::mbqiMode()==quantifiers::MBQI_FMC_INTERVAL || options::fmfBoundInt() ||
+ options::mbqiMode()==quantifiers::MBQI_TRUST ){
d_model = new quantifiers::fmcheck::FirstOrderModelFmc( this, c, "FirstOrderModelFmc" );
}else if( options::mbqiMode()==quantifiers::MBQI_INTERVAL ){
d_model = new quantifiers::FirstOrderModelQInt( this, c, "FirstOrderModelQInt" );
return false;
}
-bool QuantifiersEngine::addLemma( Node lem ){
- Debug("inst-engine-debug") << "Adding lemma : " << lem << std::endl;
- lem = Rewriter::rewrite(lem);
- if( d_lemmas_produced_c.find( lem )==d_lemmas_produced_c.end() ){
- //d_curr_out->lemma( lem );
- d_lemmas_produced_c[ lem ] = true;
+bool QuantifiersEngine::addLemma( Node lem, bool doCache ){
+ if( doCache ){
+ Debug("inst-engine-debug") << "Adding lemma : " << lem << std::endl;
+ lem = Rewriter::rewrite(lem);
+ if( d_lemmas_produced_c.find( lem )==d_lemmas_produced_c.end() ){
+ //d_curr_out->lemma( lem );
+ d_lemmas_produced_c[ lem ] = true;
+ d_lemmas_waiting.push_back( lem );
+ Debug("inst-engine-debug") << "Added lemma : " << lem << std::endl;
+ return true;
+ }else{
+ Debug("inst-engine-debug") << "Duplicate." << std::endl;
+ return false;
+ }
+ }else{
d_lemmas_waiting.push_back( lem );
- Debug("inst-engine-debug") << "Added lemma : " << lem << std::endl;
return true;
- }else{
- Debug("inst-engine-debug") << "Duplicate." << std::endl;
- return false;
}
}
friend class quantifiers::InstantiationEngine;
friend class quantifiers::ModelEngine;
friend class quantifiers::RewriteEngine;
+ friend class quantifiers::QuantConflictFind;
friend class inst::InstMatch;
private:
typedef context::CDHashMap< Node, bool, NodeHashFunction > BoolMap;
/** exist instantiation ? */
bool existsInstantiation( Node f, InstMatch& m, bool modEq = true, bool modInst = false );
/** add lemma lem */
- bool addLemma( Node lem );
+ bool addLemma( Node lem, bool doCache = true );
/** do instantiation specified by m */
bool addInstantiation( Node f, InstMatch& m, bool mkRep = true, bool modEq = false, bool modInst = false );
/** add instantiation */