options::finiteModelFind.set( true );
}
}
-
+ if( options::finiteModelFind() ){
+ if( !options::quantConflictFind.wasSetByUser() ){
+ options::quantConflictFind.set( false );
+ }
+ }
//until bugs 371,431 are fixed
if( ! options::minisatUseElim.wasSetByUser()){
if( d_logic.isQuantified() || options::produceModels() || options::produceAssignments() || options::checkModels() ){
Assert( quantifiers::TermDb::hasInstConstAttr(pat) );
d_pattern = pat;
d_match_pattern = pat;
+ d_match_pattern_type = pat.getType();
d_next = NULL;
d_matchPolicy = MATCH_GEN_DEFAULT;
}
}
}
}
+ d_match_pattern_type = d_match_pattern.getType();
Trace("inst-match-gen") << "Pattern is " << d_pattern << ", match pattern is " << d_match_pattern << std::endl;
d_match_pattern_op = qe->getTermDatabase()->getOperator( d_match_pattern );
t = d_cg->getNextCandidate();
Trace("matching-debug2") << "Matching candidate : " << t << std::endl;
//if t not null, try to fit it into match m
- if( !t.isNull() && t.getType().isSubtypeOf( d_match_pattern.getType() ) ){
+ if( !t.isNull() && t.getType().isSubtypeOf( d_match_pattern_type ) ){
success = getMatch( f, t, m, qe );
}
}while( !success && !t.isNull() );
if( d_match_pattern[i].getKind()==INST_CONSTANT ){
d_var_num[i] = d_match_pattern[i].getAttribute(InstVarNumAttribute());
}
+ d_match_pattern_arg_types.push_back( d_match_pattern[i].getType() );
}
}
Node t = it->first;
Node prev = m.get( v );
//using representatives, just check if equal
- if( ( prev.isNull() || prev==t ) && t.getType().isSubtypeOf( d_match_pattern[argIndex].getType() ) ){
+ if( ( prev.isNull() || prev==t ) && t.getType().isSubtypeOf( d_match_pattern_arg_types[argIndex] ) ){
m.setValue( v, t);
addInstantiations( m, qe, addedLemmas, argIndex+1, &(it->second) );
m.setValue( v, prev);
Node d_pattern;
/** match pattern */
Node d_match_pattern;
+ /** match pattern type */
+ TypeNode d_match_pattern_type;
/** match pattern op */
Node d_match_pattern_op;
public:
Node d_f;
/** match term */
Node d_match_pattern;
+ /** match pattern arg types */
+ std::vector< TypeNode > d_match_pattern_arg_types;
/** operator */
Node d_op;
/** to indicies */
option axiomInstMode --axiom-inst=MODE CVC4::theory::quantifiers::AxiomInstMode :default CVC4::theory::quantifiers::AXIOM_INST_MODE_DEFAULT :include "theory/quantifiers/modes.h" :handler CVC4::theory::quantifiers::stringToAxiomInstMode :handler-include "theory/quantifiers/options_handlers.h"
policy for instantiating axioms
-option quantConflictFind --quant-cf bool :read-write :default false
+option quantConflictFind --quant-cf bool :read-write :default true
enable conflict find mechanism for quantifiers
option qcfMode --quant-cf-mode=MODE CVC4::theory::quantifiers::QcfMode :default CVC4::theory::quantifiers::QCF_PROP_EQ :include "theory/quantifiers/modes.h" :handler CVC4::theory::quantifiers::stringToQcfMode :handler-include "theory/quantifiers/options_handlers.h"
what effort to apply conflict find mechanism
for( unsigned i=0; i<q[0].getNumChildren(); i++ ){\r
d_var_num[q[0][i]] = i;\r
d_vars.push_back( q[0][i] );\r
+ d_var_types.push_back( q[0][i].getType() );\r
}\r
\r
registerNode( qn, true, true );\r
Trace("qcf-qregister-debug2") << "Add FLATTEN VAR : " << n << std::endl;\r
d_var_num[n] = d_vars.size();\r
d_vars.push_back( n );\r
+ d_var_types.push_back( n.getType() );\r
d_match.push_back( TNode::null() );\r
d_match_term.push_back( TNode::null() );\r
if( n.getKind()==ITE ){\r
if( it != d_qn[index]->d_data.end() ) {\r
d_qni.push_back( it );\r
//set the match\r
- if( qi->setMatch( p, d_qni_bound[index], it->first ) ){\r
+ if( it->first.getType().isSubtypeOf( qi->d_var_types[repVar] ) && qi->setMatch( p, d_qni_bound[index], it->first ) ){\r
Debug("qcf-match-debug") << " Binding variable" << std::endl;\r
if( d_qn.size()<d_qni_size ){\r
d_qn.push_back( &it->second );\r
QuantInfo() : d_mg( NULL ) {}\r
~QuantInfo() { delete d_mg; }\r
std::vector< TNode > d_vars;\r
+ std::vector< TypeNode > d_var_types;\r
std::map< TNode, int > d_var_num;\r
std::vector< int > d_tsym_vars;\r
std::map< TNode, bool > d_inMatchConstraint;\r
for( int i=0; i<(int)terms.size(); i++ ){
Trace("inst") << " " << terms[i];
Trace("inst") << std::endl;
+ Assert( terms[i].getType().isSubtypeOf( f[0][i].getType() ) );
}
if( options::cbqi() ){
for( int i=0; i<(int)terms.size(); i++ ){