STOINTEGER_TOK = 'TO_INTEGER';
STOSTRING_TOK = 'TO_STRING';
STORE_TOK = 'TO_RE';
+
+ FMF_CARD_TOK = 'HAS_CARD';
// these are parsed by special NUMBER_OR_RANGEOP rule, below
DECIMAL_LITERAL;
case LT_TOK:
case GEQ_TOK:
case GT_TOK:
- case MEMBER_TOK: return 25;
+ case MEMBER_TOK:
+ case FMF_CARD_TOK: return 25;
case EQUAL_TOK:
case DISEQUAL_TOK: return 26;
case NOT_TOK: return 27;
case LT_TOK: return kind::LT;
case LEQ_TOK: return kind::LEQ;
case MEMBER_TOK: return kind::MEMBER;
+ case FMF_CARD_TOK: return kind::CARDINALITY_CONSTRAINT;
// arithmeticBinop
case PLUS_TOK: return kind::PLUS;
| LT_TOK
| LEQ_TOK
| MEMBER_TOK
+ | FMF_CARD_TOK
;
arithmeticBinop[unsigned& op]
}
}
int nReps = m->d_rep_set.d_type_reps.find( d_type )==m->d_rep_set.d_type_reps.end() ? 0 : (int)m->d_rep_set.d_type_reps[d_type].size();
- if( nReps!=d_maxNegCard ){
+ if( nReps!=(d_maxNegCard+1) ){
Trace("uf-ss-warn") << "WARNING : Model does not have same # representatives as cardinality for " << d_type << "." << std::endl;
Trace("uf-ss-warn") << " Max neg cardinality : " << d_maxNegCard << std::endl;
Trace("uf-ss-warn") << " # Reps : " << nReps << std::endl;
- if( d_maxNegCard>nReps ){
+ if( d_maxNegCard>=nReps ){
/*
for( unsigned i=0; i<d_fresh_aloc_reps.size(); i++ ){
if( add>0 && !m->d_equalityEngine->hasTerm( d_fresh_aloc_reps[i] ) ){