summaryrefslogtreecommitdiff
path: root/src/theory/fp/theory_fp.h
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-08-28 13:01:55 -0500
committerGitHub <noreply@github.com>2020-08-28 13:01:55 -0500
commit0c6249a1b2177fda94526b66510474f2cb01a411 (patch)
tree24fb10636b5412bf77e7147962292f4536c9eee4 /src/theory/fp/theory_fp.h
parent64eae4836286d95a04126d7bcffb18c5eb383bc1 (diff)
(new theory) Update TheoryFP to the new interface (#4953)
This updates the theory of floating points to the new interface (see #4929). Notice that TheoryFP was not adding trigger terms to its equality engine (which should be done during notifySharedTerm), and thus was not propagating equalities between shared terms in combined theories. This PR updates its notifySharedTerm method to the default one. FYI @martin-cs
Diffstat (limited to 'src/theory/fp/theory_fp.h')
-rw-r--r--src/theory/fp/theory_fp.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/src/theory/fp/theory_fp.h b/src/theory/fp/theory_fp.h
index 79ece7bce..2ef3b3f35 100644
--- a/src/theory/fp/theory_fp.h
+++ b/src/theory/fp/theory_fp.h
@@ -58,15 +58,28 @@ class TheoryFp : public Theory {
TrustNode expandDefinition(Node node) override;
void preRegisterTerm(TNode node) override;
- void notifySharedTerm(TNode node) override;
TrustNode ppRewrite(TNode node) override;
- void check(Effort) override;
-
+ //--------------------------------- standard check
+ /** Do we need a check call at last call effort? */
bool needsCheckLastEffort() override { return true; }
+ /** Post-check, called after the fact queue of the theory is processed. */
+ void postCheck(Effort level) override;
+ /** Pre-notify fact, return true if processed. */
+ bool preNotifyFact(TNode atom,
+ bool pol,
+ TNode fact,
+ bool isPrereg,
+ bool isInternal) override;
+ //--------------------------------- end standard check
+
Node getModelValue(TNode var) override;
bool collectModelInfo(TheoryModel* m) override;
+ /** Collect model values in m based on the relevant terms given by
+ * relevantTerms */
+ bool collectModelValues(TheoryModel* m,
+ const std::set<Node>& relevantTerms) override;
std::string identify() const override { return "THEORY_FP"; }
@@ -108,10 +121,17 @@ class TheoryFp : public Theory {
/** Interaction with the rest of the solver **/
void handleLemma(Node node);
- bool handlePropagation(TNode node);
- void handleConflict(TNode node);
+ /**
+ * Called when literal node is inferred by the equality engine. This
+ * propagates node on the output channel.
+ */
+ bool propagateLit(TNode node);
+ /**
+ * Called when two constants t1 and t2 merge in the equality engine. This
+ * sends a conflict on the output channel.
+ */
+ void conflictEqConstantMerge(TNode t1, TNode t2);
- context::CDO<bool> d_conflict;
context::CDO<Node> d_conflictNode;
typedef context::CDHashMap<TypeNode, Node, TypeNodeHashFunction>
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback