not_defeq2->print(cout);
}
cout.flush();
- _exit(1);
+ exit(1);
}
Expr *call_run_code(Expr *code) {
while( !d_eq.isFinished() ){
Node n = (*d_eq);
++d_eq;
- if( n.getType()==d_match_pattern[0].getType() ){
+ if( n.getType().isSubtypeOf( d_match_pattern[0].getType() ) ){
//an equivalence class with the same type as the pattern, return reflexive equality
return NodeManager::currentNM()->mkNode( d_match_pattern.getKind(), n, n );
}
while( !d_eq.isFinished() ){
Node n = (*d_eq);
++d_eq;
- if( n.getType()==d_match_pattern.getType() ){
+ if( n.getType().isSubtypeOf( d_match_pattern.getType() ) ){
//an equivalence class with the same type as the pattern, return it
return n;
}
InstMatchGenerator::InstMatchGenerator( Node pat, int matchPolicy ) : d_matchPolicy( matchPolicy ){
+ d_needsReset = true;
d_active_add = false;
Assert( quantifiers::TermDb::hasInstConstAttr(pat) );
d_pattern = pat;
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()==d_match_pattern.getType() ){
+ if( !t.isNull() && t.getType().isSubtypeOf( d_match_pattern.getType() ) ){
success = getMatch( f, t, m, qe );
}
}while( !success && !t.isNull() );
}
void InstMatchGeneratorSimple::addInstantiations( InstMatch& m, QuantifiersEngine* qe, int& addedLemmas, int argIndex, quantifiers::TermArgTrie* tat ){
+ Debug("simple-trigger-debug") << "Add inst " << argIndex << " " << d_match_pattern << std::endl;
if( argIndex==(int)d_match_pattern.getNumChildren() ){
//m is an instantiation
if( qe->addInstantiation( d_f, m ) ){
for( std::map< Node, quantifiers::TermArgTrie >::iterator it = tat->d_data.begin(); it != tat->d_data.end(); ++it ){
Node t = it->first;
Node prev = m.get( v );
- if( ( prev.isNull() || prev==t ) && d_match_pattern[argIndex].getType()==t.getType() ){
+ if( ( prev.isNull() || prev==t ) && t.getType().isSubtypeOf( d_match_pattern[argIndex].getType() ) ){
m.setValue( v, t);
addInstantiations( m, qe, addedLemmas, argIndex+1, &(it->second) );
m.setValue( v, prev);
}
}
+void TermArgTrie::debugPrint( const char * c, Node n, unsigned depth ) {
+ for( std::map< Node, TermArgTrie >::iterator it = d_data.begin(); it != d_data.end(); ++it ){
+ for( unsigned i=0; i<depth; i++ ){ Debug(c) << " "; }
+ Debug(c) << it->first << std::endl;
+ it->second.debugPrint( c, n, depth+1 );
+ }
+}
+
TermDb::TermDb( context::Context* c, context::UserContext* u, QuantifiersEngine* qe ) : d_quantEngine( qe ), d_op_ccount( u ) {
}
Debug("term-db-cong") << "TermDb: Reset" << std::endl;
Debug("term-db-cong") << "Congruent/Non-Congruent = ";
Debug("term-db-cong") << congruentCount << "(" << alreadyCongruentCount << ") / " << nonCongruentCount << std::endl;
+ if( Debug.isOn("term-db") ){
+ Debug("term-db") << "functions : " << std::endl;
+ for( std::map< Node, std::vector< Node > >::iterator it = d_op_map.begin(); it != d_op_map.end(); ++it ){
+ if( it->second.size()>0 ){
+ Debug("term-db") << "- " << it->first << std::endl;
+ d_func_map_trie[ it->first ].debugPrint("term-db", it->second[0]);
+ }
+ }
+ }
}
Node TermDb::getModelBasisTerm( TypeNode tn, int i ){
std::map< Node, TermArgTrie > d_data;
public:
bool addTerm( QuantifiersEngine* qe, Node n ) { return addTerm2( qe, n, 0 ); }
+ void debugPrint( const char * c, Node n, unsigned depth = 0 );
};/* class TermArgTrie */
symmetric_unsat_7.smt2 \
javafe.ast.StmtVec.009.smt2 \
ARI176e1.smt2 \
- bi-artm-s.smt2
+ bi-artm-s.smt2 \
+ simp-typ-test.smt2
# regression can be solved with --finite-model-find --fmf-inst-engine
# set3.smt2
--- /dev/null
+(set-logic UFLIRA)\r
+(set-info :status unsat)\r
+; ensure that E-matching matches on sub-types\r
+(declare-fun P (Real) Bool)\r
+(assert (forall ((x Real)) (P x)))\r
+(assert (not (P 5)))\r
+(check-sat)
\ No newline at end of file