r = getRepresentative( r );
}else{
if( r.getType().isSort() ){
+ //TODO : this can happen in rare cases
+ // say x:(Array Int U), select( x, 0 ), x assigned (const @u1).
Trace("internal-rep-warn") << "No representative for UF constant." << std::endl;
}
}
}
void RepSet::add( TypeNode tn, Node n ){
- Trace("rsi-debug") << "Add rep #" << d_type_reps[tn].size() << " for " << tn << " : " << n << std::endl;
- Assert( n.getType().isSubtypeOf( tn ) );
- d_tmap[ n ] = (int)d_type_reps[tn].size();
- d_type_reps[tn].push_back( n );
+ //for now, do not add array constants FIXME
+ if( !tn.isArray() || !n.isConst() ){
+ Trace("rsi-debug") << "Add rep #" << d_type_reps[tn].size() << " for " << tn << " : " << n << std::endl;
+ Assert( n.getType().isSubtypeOf( tn ) );
+ d_tmap[ n ] = (int)d_type_reps[tn].size();
+ d_type_reps[tn].push_back( n );
+ }
}
int RepSet::getIndexFor( Node n ) const {
d_incomplete = true;
}
}
- //enumerate if the sort is reasonably small, the upper bound of 1000 is chosen arbitrarily for now
- }else if( tn.getCardinality().isFinite() && !tn.getCardinality().isLargeFinite() &&
+ //enumerate if the sort is reasonably small, not an Array, the upper bound of 1000 is chosen arbitrarily for now
+ }else if( !tn.isArray() && tn.getCardinality().isFinite() && !tn.getCardinality().isLargeFinite() &&
tn.getCardinality().getFiniteCardinality().toUnsignedInt()<=1000 ){
d_rep_set->complete( tn );
}else{