diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2017-12-08 10:14:31 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-08 10:14:31 -0600 |
commit | 564234963dd7e76c8d9b88ef941a6683694e5b53 (patch) | |
tree | 313e46520c07d1536fffbad4b7080937cfc09aae /src/theory/fp | |
parent | 805d4b7483e51a9b4d24058d493f85700a87f099 (diff) |
Make collect model info return a Bool (#1421)
Diffstat (limited to 'src/theory/fp')
-rw-r--r-- | src/theory/fp/theory_fp.cpp | 10 | ||||
-rw-r--r-- | src/theory/fp/theory_fp.h | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/theory/fp/theory_fp.cpp b/src/theory/fp/theory_fp.cpp index 276edfc0a..5be4a4601 100644 --- a/src/theory/fp/theory_fp.cpp +++ b/src/theory/fp/theory_fp.cpp @@ -578,7 +578,8 @@ Node TheoryFp::getModelValue(TNode var) { return d_conv.getValue(d_valuation, var); } -void TheoryFp::collectModelInfo(TheoryModel *m) { +bool TheoryFp::collectModelInfo(TheoryModel *m) +{ std::set<Node> relevantTerms; Trace("fp-collectModelInfo") @@ -632,10 +633,13 @@ void TheoryFp::collectModelInfo(TheoryModel *m) { << "TheoryFp::collectModelInfo(): relevantVariable " << node << std::endl; - m->assertEquality(node, d_conv.getValue(d_valuation, node), true); + if (!m->assertEquality(node, d_conv.getValue(d_valuation, node), true)) + { + return false; + } } - return; + return true; } bool TheoryFp::NotifyClass::eqNotifyTriggerEquality(TNode equality, diff --git a/src/theory/fp/theory_fp.h b/src/theory/fp/theory_fp.h index 5205f5e23..614cbff46 100644 --- a/src/theory/fp/theory_fp.h +++ b/src/theory/fp/theory_fp.h @@ -46,7 +46,7 @@ class TheoryFp : public Theory { void check(Effort); Node getModelValue(TNode var); - void collectModelInfo(TheoryModel* m); + bool collectModelInfo(TheoryModel* m) override; std::string identify() const { return "THEORY_FP"; } |