diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2019-12-09 14:32:32 -0600 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2019-12-09 12:32:32 -0800 |
commit | 33c5eb093a7f032a7d9c9263da595eb53fdd223b (patch) | |
tree | a08a2ab95bb8e09b6be768b18b99346c48488dec /src/theory/quantifiers/fmf | |
parent | b6ce0f23ce0aaa0552767e8067fe58dbceee11cb (diff) |
Fix case of uninterpreted constant instantiation in FMF (#3543)
Fixes #3537.
This benchmark triggers a potential unsoundness caused by instantiating with an uninterpreted constant (which is unsound).
Diffstat (limited to 'src/theory/quantifiers/fmf')
-rw-r--r-- | src/theory/quantifiers/fmf/full_model_check.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/theory/quantifiers/fmf/full_model_check.cpp b/src/theory/quantifiers/fmf/full_model_check.cpp index f397b9a0a..d6c939e5d 100644 --- a/src/theory/quantifiers/fmf/full_model_check.cpp +++ b/src/theory/quantifiers/fmf/full_model_check.cpp @@ -793,13 +793,13 @@ bool FullModelChecker::exhaustiveInstantiate(FirstOrderModelFmc * fm, Node f, No std::vector< Node > inst; for (unsigned i = 0; i < riter.getNumTerms(); i++) { - Node rr = riter.getCurrentTerm( i ); - Node r = rr; - //if( r.getType().isSort() ){ - r = fm->getRepresentative( r ); - //}else{ - // r = fm->getCurrentModelValue( r ); - //} + TypeNode tn = riter.getTypeOf(i); + // if the type is not closed enumerable (see + // TypeNode::isClosedEnumerable), then we must ensure that we are + // using a term and not a value. This ensures that e.g. uninterpreted + // constants do not appear in instantiations. + Node rr = riter.getCurrentTerm(i, !tn.isClosedEnumerable()); + Node r = fm->getRepresentative(rr); debugPrint("fmc-exh-debug", r); Trace("fmc-exh-debug") << " (term : " << rr << ")"; ev_inst.push_back( r ); |