Trace("dt-cg") << "Arg #" << k << " is " << x << " " << y << std::endl;
if( d_equalityEngine.isTriggerTerm(x, THEORY_DATATYPES) && d_equalityEngine.isTriggerTerm(y, THEORY_DATATYPES) ){
EqualityStatus eqStatus = d_valuation.getEqualityStatus(x, y);
- if( eqStatus!=EQUALITY_UNKNOWN ){
+ if( eqStatus==EQUALITY_FALSE_AND_PROPAGATED || eqStatus==EQUALITY_FALSE || eqStatus==EQUALITY_UNKNOWN ){
+ somePairIsDisequal = true;
+ break;
+ }else{
TNode x_shared = d_equalityEngine.getTriggerTermRepresentative(x, THEORY_DATATYPES);
TNode y_shared = d_equalityEngine.getTriggerTermRepresentative(y, THEORY_DATATYPES);
Trace("dt-cg") << "Arg #" << k << " shared term is " << x_shared << " " << y_shared << std::endl;
return it->second;
}else{
//add constructor to equivalence class
- Node n_ic = DatatypesRewriter::getInstCons( n, dt, index );
+ Node k = n;
+ if( n.getKind()==APPLY_CONSTRUCTOR ){
+ //must construct variable to refer to n, add lemma immediately
+ k = NodeManager::currentNM()->mkSkolem( "k", n.getType(), "for dt instantiation" );
+ Node eq = k.eqNode( n );
+ Trace("datatypes-infer") << "DtInfer : instantiation ref : " << eq << std::endl;
+ d_out->lemma( eq );
+ }
+ Node n_ic = DatatypesRewriter::getInstCons( k, dt, index );
if( isActive ){
for( unsigned i = 0; i<n_ic.getNumChildren(); i++ ){
- processNewTerm( n_ic[i] );
+ Assert( n_ic[i]==Rewriter::rewrite( n_ic[i] ) );
+ //processNewTerm( n_ic[i] );
}
collectTerms( n_ic );
}
// break;
// }
//}
- }else if( n.getKind()==EQUAL && ( n[0].getKind()==DT_SIZE || n[1].getKind()==DT_SIZE ) ){
+ }else if( n.getKind()==EQUAL && !n[0].getType().isDatatype() ){
addLemma = true;
}else if( n.getKind()==LEQ ){
addLemma = true;
wiki.20.cvc \
wiki.21.cvc \
queries0.cvc \
+ trim.cvc \
print_lambda.cvc
# Regression tests for TPTP inputs
bug421b.smt2 \
bug425.cvc \
bug480.smt2 \
+ bug484.smt2 \
bug486.cvc \
bug507.smt2 \
bug512.minimized.smt2 \
TESTS = $(SMT_TESTS) $(SMT2_TESTS) $(CVC_TESTS) $(TPTP_TESTS) $(BUG_TESTS)
# bug512 -- taking too long, --time-per not working perhaps? in any case,
-# bug484.smt2
-# trim.cvc
# we have a minimized version still getting tested
DISABLED_TESTS = \
bug512.smt2