summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2014-04-14 15:36:28 -0500
committerAndrew Reynolds <andrew.j.reynolds@gmail.com>2014-04-14 15:36:28 -0500
commit1138911e0af7c15a7b41a5d02ff3edab2c837449 (patch)
tree6b7a70bd32d461cff687f11def74bab0447aad82 /src/theory/quantifiers
parentb71bbbbc607b5ca0c2bec8b8cf6c7af596d21997 (diff)
Fix bug in mbqi=fmc handling theory symbols. Fix mbqi=fmc models (Bug 557). Improve datatypes rewrite, make option for previous dt semantics.
Diffstat (limited to 'src/theory/quantifiers')
-rw-r--r--src/theory/quantifiers/first_order_model.cpp15
-rw-r--r--src/theory/quantifiers/full_model_check.cpp2
2 files changed, 14 insertions, 3 deletions
diff --git a/src/theory/quantifiers/first_order_model.cpp b/src/theory/quantifiers/first_order_model.cpp
index 54be11b44..d5c2b0e9d 100644
--- a/src/theory/quantifiers/first_order_model.cpp
+++ b/src/theory/quantifiers/first_order_model.cpp
@@ -648,7 +648,18 @@ Node FirstOrderModelFmc::getFunctionValue(Node op, const char* argPrefix ) {
Node boundVarList = NodeManager::currentNM()->mkNode(kind::BOUND_VAR_LIST, vars);
Node curr;
for( int i=(d_models[op]->d_cond.size()-1); i>=0; i--) {
- Node v = getRepresentative( d_models[op]->d_value[i] );
+ Node v = d_models[op]->d_value[i];
+ if( !hasTerm( v ) ){
+ //can happen when the model basis term does not exist in ground assignment
+ TypeNode tn = v.getType();
+ if( d_rep_set.d_type_reps.find( tn )!=d_rep_set.d_type_reps.end() && !d_rep_set.d_type_reps[ tn ].empty() ){
+ //see full_model_check.cpp line 366
+ v = d_rep_set.d_type_reps[tn][ d_rep_set.d_type_reps[tn].size()-1 ];
+ }else{
+ Assert( false );
+ }
+ }
+ v = getRepresentative( v );
if( curr.isNull() ){
curr = v;
}else{
@@ -664,7 +675,7 @@ Node FirstOrderModelFmc::getFunctionValue(Node op, const char* argPrefix ) {
if( !isStar(cond[j][1]) ){
children.push_back( NodeManager::currentNM()->mkNode( LT, vars[j], cond[j][1] ) );
}
- }else if ( !isStar(cond[j]) && //handle the case where there are 0 or 1 ground representatives of this type...
+ }else if ( !isStar(cond[j]) && //handle the case where there are 0 or 1 ground eqc of this type
d_rep_set.d_type_reps.find( tn )!=d_rep_set.d_type_reps.end() && d_rep_set.d_type_reps[ tn ].size()>1 ){
Node c = getUsedRepresentative( cond[j] );
children.push_back( NodeManager::currentNM()->mkNode( EQUAL, vars[j], c ) );
diff --git a/src/theory/quantifiers/full_model_check.cpp b/src/theory/quantifiers/full_model_check.cpp
index 6c889781d..126b30b81 100644
--- a/src/theory/quantifiers/full_model_check.cpp
+++ b/src/theory/quantifiers/full_model_check.cpp
@@ -937,7 +937,7 @@ void FullModelChecker::doCheck(FirstOrderModelFmc * fm, Node f, Def & d, Node n
void FullModelChecker::doNegate( Def & dc ) {
for (unsigned i=0; i<dc.d_cond.size(); i++) {
if (!dc.d_value[i].isNull()) {
- dc.d_value[i] = dc.d_value[i]==d_true ? d_false : d_true;
+ dc.d_value[i] = dc.d_value[i]==d_true ? d_false : ( dc.d_value[i]==d_false ? d_true : dc.d_value[i] );
}
}
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback