Assert( mpat.getKind()==INST_CONSTANT );
d_f = quantifiers::TermDb::getInstConstAttr( mpat );
d_index = mpat.getAttribute(InstVarNumAttribute());
+ d_firstTime = false;
}
void CandidateGeneratorQEAll::resetInstantiationRound() {
Assert( dt.isSygus() );
//get the solution
Node sol;
- int status;
+ int status = -1;
if( d_last_inst_si ){
Assert( d_conj->getCegConjectureSingleInv() != NULL );
sol = d_conj->getSingleInvocationSolution( i, tn, status );
if( is_cv ){
d_stack_vars.push_back( pv );
}
- if( vinst!=NULL ){
- d_active_instantiators.erase( pv );
- }
+ d_active_instantiators.erase( pv );
unregisterInstantiationVariable( pv );
return false;
}
d_uequalityEngine(d_notify, c, "ConjectureGenerator::ee", false),
d_ee_conjectures( c ){
d_fullEffortCount = 0;
+ d_conj_count = 0;
+ d_subs_confirmCount = 0;
+ d_subs_unkCount = 0;
d_uequalityEngine.addFunctionKind( kind::APPLY_UF );
d_uequalityEngine.addFunctionKind( kind::APPLY_CONSTRUCTOR );
Node r = qe->getEqualityQuery()->getRepresentative( d_eqc );
//iterate over all classes except r
tat = qe->getTermDatabase()->getTermArgTrie( Node::null(), d_op );
- for( std::map< TNode, quantifiers::TermArgTrie >::iterator it = tat->d_data.begin(); it != tat->d_data.end(); ++it ){
- if( it->first!=r ){
- InstMatch m( q );
- m.add( baseMatch );
- addInstantiations( m, qe, addedLemmas, 0, &(it->second) );
- if( qe->inConflict() ){
- break;
+ if( tat ){
+ for( std::map< TNode, quantifiers::TermArgTrie >::iterator it = tat->d_data.begin(); it != tat->d_data.end(); ++it ){
+ if( it->first!=r ){
+ InstMatch m( q );
+ m.add( baseMatch );
+ addInstantiations( m, qe, addedLemmas, 0, &(it->second) );
+ if( qe->inConflict() ){
+ break;
+ }
}
}
+ tat = NULL;
}
- tat = NULL;
}
}
Debug("simple-trigger-debug") << "Adding instantiations based on " << tat << " from " << d_op << " " << d_eqc << std::endl;
InstPropagator::InstPropagator( QuantifiersEngine* qe ) :
d_qe( qe ), d_notify(*this), d_qy( qe ){
+ d_icount = 1;
+ d_conflict = false;
}
bool InstPropagator::reset( Theory::Effort e ) {
: InstStrategyCbqi( qe ) {
d_out = new CegqiOutputInstStrategy( this );
d_small_const = NodeManager::currentNM()->mkConst( Rational(1)/Rational(1000000) );
+ d_check_vts_lemma_lc = false;
}
InstStrategyCegqi::~InstStrategyCegqi() throw () {
//elimination information (for delayed elimination)
class NestedQEInfo {
public:
- NestedQEInfo(){}
+ NestedQEInfo() : d_doVts(false){}
~NestedQEInfo(){}
Node d_q;
std::vector< Node > d_inst_terms;
d_regenerate_frequency = 3;
d_regenerate = true;
}else{
+ d_regenerate_frequency = 1;
d_regenerate = false;
}
}
using namespace CVC4::kind;
+QuantifierMacros::QuantifierMacros( QuantifiersEngine * qe ) : d_qe( qe ){
+ d_ground_macros = false;
+}
+
bool QuantifierMacros::simplify( std::vector< Node >& assertions, bool doRewrite ){
unsigned rmax = options::macrosQuantMode()==MACROS_QUANT_MODE_ALL ? 2 : 1;
for( unsigned r=0; r<rmax; r++ ){
void addMacro( Node op, Node n, std::vector< Node >& opc );
void debugMacroDefinition( Node oo, Node n );
public:
- QuantifierMacros( QuantifiersEngine * qe ) : d_qe( qe ){}
+ QuantifierMacros( QuantifiersEngine * qe );
~QuantifierMacros(){}
bool simplify( std::vector< Node >& assertions, bool doRewrite = false );
d_n(),
d_type( typ_invalid ),
d_type_not()
-{}
+{
+ d_qni_size = 0;
+ d_child_counter = -1;
+ d_use_children = true;
+}
MatchGen::MatchGen( QuantInfo * qi, Node n, bool isVar )
d_type(),
d_type_not()
{
+ //initialize temporary
+ d_child_counter = -1;
+ d_use_children = true;
+
Trace("qcf-qregister-debug") << "Make match gen for " << n << ", isVar = " << isVar << std::endl;
std::vector< Node > qni_apps;
d_qni_size = 0;
//what each literal does
class RDomainLit {
public:
- RDomainLit() : d_merge(false){}
+ RDomainLit() : d_merge(false){
+ d_rd[0] = NULL;
+ d_rd[1] = NULL;
+ }
~RDomainLit(){}
bool d_merge;
RDomain * d_rd[2];
d_op_id_count(0),
d_typ_id_count(0),
d_sygus_tdb(NULL) {
+ d_consistent_ee = true;
d_true = NodeManager::currentNM()->mkConst(true);
d_false = NodeManager::currentNM()->mkConst(false);
d_zero = NodeManager::currentNM()->mkConst(Rational(0));
}
if( d_term_db->isEntailed( q[1], subs, false, true ) ){
Trace("inst-add-debug") << " --> Currently entailed." << std::endl;
+ ++(d_statistics.d_inst_duplicate_ent);
return false;
}
//Node eval = d_term_db->evaluateTerm( q[1], subs, false, true );
d_instantiations("QuantifiersEngine::Instantiations_Total", 0),
d_inst_duplicate("QuantifiersEngine::Duplicate_Inst", 0),
d_inst_duplicate_eq("QuantifiersEngine::Duplicate_Inst_Eq", 0),
+ d_inst_duplicate_ent("QuantifiersEngine::Duplicate_Inst_Entailed", 0),
d_triggers("QuantifiersEngine::Triggers", 0),
d_simple_triggers("QuantifiersEngine::Triggers_Simple", 0),
d_multi_triggers("QuantifiersEngine::Triggers_Multi", 0),
smtStatisticsRegistry()->registerStat(&d_instantiations);
smtStatisticsRegistry()->registerStat(&d_inst_duplicate);
smtStatisticsRegistry()->registerStat(&d_inst_duplicate_eq);
+ smtStatisticsRegistry()->registerStat(&d_inst_duplicate_ent);
smtStatisticsRegistry()->registerStat(&d_triggers);
smtStatisticsRegistry()->registerStat(&d_simple_triggers);
smtStatisticsRegistry()->registerStat(&d_multi_triggers);
smtStatisticsRegistry()->unregisterStat(&d_instantiations);
smtStatisticsRegistry()->unregisterStat(&d_inst_duplicate);
smtStatisticsRegistry()->unregisterStat(&d_inst_duplicate_eq);
+ smtStatisticsRegistry()->unregisterStat(&d_inst_duplicate_ent);
smtStatisticsRegistry()->unregisterStat(&d_triggers);
smtStatisticsRegistry()->unregisterStat(&d_simple_triggers);
smtStatisticsRegistry()->unregisterStat(&d_multi_triggers);
IntStat d_instantiations;
IntStat d_inst_duplicate;
IntStat d_inst_duplicate_eq;
+ IntStat d_inst_duplicate_ent;
IntStat d_triggers;
IntStat d_simple_triggers;
IntStat d_multi_triggers;
return ( s2 == r[0].getConst<String>() );
} else {
Assert( false, "RegExp contains variables" );
+ return false;
}
}
case kind::REGEXP_CONCAT: {