summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2017-09-07 11:50:59 +0200
committerGitHub <noreply@github.com>2017-09-07 11:50:59 +0200
commit8a68cca2f9cf76b42187c39d09a4a40bd19622c1 (patch)
treee238ce80d9273cf086c972bc5b60e9a51a67567e
parent15486098da0e2131ca4299b9fdea1510008a60c4 (diff)
Properly handle user cardinality constraints for uf-ss=none. (#1068)
-rw-r--r--src/theory/uf/theory_uf.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/theory/uf/theory_uf.cpp b/src/theory/uf/theory_uf.cpp
index 6d4d96a87..981e3e2ac 100644
--- a/src/theory/uf/theory_uf.cpp
+++ b/src/theory/uf/theory_uf.cpp
@@ -125,13 +125,18 @@ void TheoryUF::check(Effort level) {
d_equalityEngine.assertEquality(atom, polarity, fact);
} else if (atom.getKind() == kind::CARDINALITY_CONSTRAINT || atom.getKind() == kind::COMBINED_CARDINALITY_CONSTRAINT) {
if( d_thss == NULL ){
- std::stringstream ss;
- ss << "Cardinality constraint " << atom << " was asserted, but the logic does not allow it." << std::endl;
- ss << "Try using a logic containing \"UFC\"." << std::endl;
- throw Exception( ss.str() );
+ if( !getLogicInfo().hasCardinalityConstraints() ){
+ std::stringstream ss;
+ ss << "Cardinality constraint " << atom << " was asserted, but the logic does not allow it." << std::endl;
+ ss << "Try using a logic containing \"UFC\"." << std::endl;
+ throw Exception( ss.str() );
+ }else{
+ // support for cardinality constraints is not enabled, set incomplete
+ d_out->setIncomplete();
+ }
}
//needed for models
- if( options::produceModels() && ( atom.getKind() == kind::COMBINED_CARDINALITY_CONSTRAINT || options::ufssMode()!=UF_SS_FULL ) ){
+ if( options::produceModels() ){
d_equalityEngine.assertPredicate(atom, polarity, fact);
}
} else {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback