Trace("dt-collapse-sel") << "collapse selector : " << s << " " << c << std::endl;
Node r;
bool wrong = false;
- Node use_s;
- Node eq_exp;
- if( options::dtRefIntro() ){
- eq_exp = d_true;
- use_s = getTermSkolemFor( c );
- }else{
- eq_exp = c.eqNode( s[0] );
- use_s = s;
- }
+ Node eq_exp = c.eqNode(s[0]);
if( s.getKind()==kind::APPLY_SELECTOR_TOTAL ){
Node selector = s.getOperator();
size_t constructorIndex = utils::indexOf(c.getOperator());
const DTypeConstructor& dtc = dt[constructorIndex];
int selectorIndex = dtc.getSelectorIndexInternal(selector);
wrong = selectorIndex<0;
-
- //if( wrong ){
- // return;
- //}
r = NodeManager::currentNM()->mkNode( kind::APPLY_SELECTOR_TOTAL, s.getOperator(), c );
- if( options::dtRefIntro() ){
- use_s = NodeManager::currentNM()->mkNode( kind::APPLY_SELECTOR_TOTAL, s.getOperator(), use_s );
- }
}
if( !r.isNull() ){
Node rr = Rewriter::rewrite( r );
std::map< Node, Node > visited;
rrs = removeUninterpretedConstants( rr, visited );
}
- if( use_s!=rrs ){
- Node eq = use_s.eqNode( rrs );
- Node peq;
- if( options::dtRefIntro() ){
- peq = d_true;
- }else{
- peq = c.eqNode(s[0]);
- }
+ if (s != rrs)
+ {
+ Node eq = s.eqNode(rrs);
+ Node peq = c.eqNode(s[0]);
Trace("datatypes-infer") << "DtInfer : collapse sel";
//Trace("datatypes-infer") << ( wrong ? " wrong" : "");
Trace("datatypes-infer") << " : " << eq << " by " << peq << std::endl;