summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/skolemize.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-02-23 19:12:32 -0600
committerGitHub <noreply@github.com>2021-02-23 19:12:32 -0600
commit854ab7e1adce90ebd822cc29ffabf5546d13f5cc (patch)
tree96bcb318ada0448c73d293c0b99db7b98eb1e4c4 /src/theory/quantifiers/skolemize.cpp
parent4c0dbb8ec7871ff114a9e66233cd8c8dd853f0b4 (diff)
Add interface to TheoryState for sort inference and facts (#5967)
This eliminates the need for direct references to TheoryEngine from quantifiers and UF+cardinality. This PR also eliminates an unnecessary reference to TheoryEngine in TheoryModelBuilder and breaks a few more dependencies in quantifiers modules.
Diffstat (limited to 'src/theory/quantifiers/skolemize.cpp')
-rw-r--r--src/theory/quantifiers/skolemize.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/theory/quantifiers/skolemize.cpp b/src/theory/quantifiers/skolemize.cpp
index 4f9a0ee91..2e9093b82 100644
--- a/src/theory/quantifiers/skolemize.cpp
+++ b/src/theory/quantifiers/skolemize.cpp
@@ -14,12 +14,13 @@
#include "theory/quantifiers/skolemize.h"
+#include "expr/dtype.h"
#include "expr/skolem_manager.h"
#include "options/quantifiers_options.h"
#include "options/smt_options.h"
#include "theory/quantifiers/quantifiers_attributes.h"
+#include "theory/quantifiers/quantifiers_state.h"
#include "theory/quantifiers/term_util.h"
-#include "theory/quantifiers_engine.h"
#include "theory/sort_inference.h"
#include "theory/theory_engine.h"
@@ -29,10 +30,8 @@ namespace CVC4 {
namespace theory {
namespace quantifiers {
-Skolemize::Skolemize(QuantifiersEngine* qe,
- QuantifiersState& qs,
- ProofNodeManager* pnm)
- : d_quantEngine(qe),
+Skolemize::Skolemize(QuantifiersState& qs, ProofNodeManager* pnm)
+ : d_qstate(qs),
d_skolemized(qs.getUserContext()),
d_pnm(pnm),
d_epg(pnm == nullptr ? nullptr
@@ -350,13 +349,13 @@ Node Skolemize::getSkolemizedBody(Node f)
}
}
Assert(d_skolem_constants[f].size() == f[0].getNumChildren());
- if (options::sortInference())
+ SortInference* si = d_qstate.getSortInference();
+ if (si != nullptr)
{
for (unsigned i = 0; i < d_skolem_constants[f].size(); i++)
{
// carry information for sort inference
- d_quantEngine->getTheoryEngine()->getSortInference()->setSkolemVar(
- f, f[0][i], d_skolem_constants[f][i]);
+ si->setSkolemVar(f, f[0][i], d_skolem_constants[f][i]);
}
}
return ret;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback