summaryrefslogtreecommitdiff
path: root/src/theory/theory_model.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-05-05 18:09:24 -0500
committerGitHub <noreply@github.com>2021-05-05 18:09:24 -0500
commit2283ee3b0327441c29caf26be977c1e4cd13c637 (patch)
tree18bc8401f863fab8cb5f57d0c28a729650303d44 /src/theory/theory_model.cpp
parentdde3aac0417c10cdd1f8217f653bcdf95d94290c (diff)
Do not have quantifiers model inherit from theory model (#6493)
This is work towards making the initialization of theory engine, theory models, quantifiers engine more flexible. This makes it so that the specialized quantifiers models classes (FirstOrderModel) do not inherit from TheoryModel. There is no longer any reason for this, since FirstOrderModel does not have any override methods. As a result of this PR, there is only one kind of TheoryModel and it is constructed immediately when ModelManager is constructed. This required refactoring the initialization of when FirstOrderModel is constructed in ModelBuilder classes in quantifiers. This also avoids the need for casting TheoryModel to FirstOrderModel.
Diffstat (limited to 'src/theory/theory_model.cpp')
-rw-r--r--src/theory/theory_model.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/theory/theory_model.cpp b/src/theory/theory_model.cpp
index 40a64cb35..1543739e0 100644
--- a/src/theory/theory_model.cpp
+++ b/src/theory/theory_model.cpp
@@ -681,6 +681,18 @@ bool TheoryModel::areDisequal(TNode a, TNode b)
}
}
+bool TheoryModel::hasUfTerms(Node f) const
+{
+ return d_uf_terms.find(f) != d_uf_terms.end();
+}
+
+const std::vector<Node>& TheoryModel::getUfTerms(Node f) const
+{
+ const auto it = d_uf_terms.find(f);
+ Assert(it != d_uf_terms.end());
+ return it->second;
+}
+
bool TheoryModel::areFunctionValuesEnabled() const
{
return d_enableFuncModels;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback