diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-02-26 09:02:15 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 09:02:15 -0600 |
commit | abd0048cdb6cf4d2ee0a096c9f7a63a1f7f1d9c8 (patch) | |
tree | cffa12338950b4d7b5bfc43e78849684b6058e30 /src/theory/theory_model.cpp | |
parent | 50c31e61ab240ccd551a0aea732f8b9a88d7fb32 (diff) |
Support for witnessing choice in models (#3781)
Fixes #3300.
This adds an option --model-witness-choice that ensures that choices in models are of the form (choice ((x Int)) (or (= x c) P)), which is helpful if the user wants to know a potential value in the range of the choice.
Diffstat (limited to 'src/theory/theory_model.cpp')
-rw-r--r-- | src/theory/theory_model.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/theory/theory_model.cpp b/src/theory/theory_model.cpp index c6055ede9..399695131 100644 --- a/src/theory/theory_model.cpp +++ b/src/theory/theory_model.cpp @@ -598,6 +598,11 @@ void TheoryModel::recordApproximation(TNode n, TNode pred) // model cache is invalid d_modelCache.clear(); } +void TheoryModel::recordApproximation(TNode n, TNode pred, Node witness) +{ + Node predDisj = NodeManager::currentNM()->mkNode(OR, n.eqNode(witness), pred); + recordApproximation(n, predDisj); +} void TheoryModel::setUsingModelCore() { d_using_model_core = true; |