diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2013-04-01 17:34:27 -0400 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2013-04-01 20:09:21 -0400 |
commit | 4d7cff8156c2e409be209f1ee489dcf05f922d50 (patch) | |
tree | b0b7ba4e98cee86b3c37094c90c980c0042db475 /src/theory/model.cpp | |
parent | a197d41f1945dcaf64cc80fff5ac3a828c0ba0d2 (diff) |
Fixes for two bugs:
* one that Tim found in model generation for records containing Booleans
* another that the fuzzer found in quantifiers + check-models
Test cases enabled/added for both.
Diffstat (limited to 'src/theory/model.cpp')
-rw-r--r-- | src/theory/model.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/theory/model.cpp b/src/theory/model.cpp index 2c5844cd4..b4ac8d27e 100644 --- a/src/theory/model.cpp +++ b/src/theory/model.cpp @@ -51,7 +51,9 @@ Node TheoryModel::getValue( TNode n ) const{ //apply substitutions Node nn = d_substitutions.apply( n ); //get value in model - return getModelValue( nn ); + nn = getModelValue( nn ); + Assert(nn.isConst() || nn.getKind() == kind::LAMBDA); + return nn; } Expr TheoryModel::getValue( Expr expr ) const{ @@ -150,7 +152,6 @@ Node TheoryModel::getModelValue(TNode n, bool hasBoundVars) const if(val.getKind() == kind::CARDINALITY_CONSTRAINT) { val = NodeManager::currentNM()->mkConst(getCardinality(val[0].getType().toType()).getFiniteCardinality() <= val[1].getConst<Rational>().getNumerator()); } - Assert(hasBoundVars || val.isConst()); return val; } |