summaryrefslogtreecommitdiff
path: root/src/smt
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-04-14 11:49:50 -0500
committerGitHub <noreply@github.com>2021-04-14 16:49:50 +0000
commitf74bdbd182d95a8e6395aaaf348ca0e41baa3bf4 (patch)
treedd613c05f5633cc9e7b3f17ef8c2f053c7b81ced /src/smt
parent5f6b4f8dd31e21f935c3f4a441af11e18e12d283 (diff)
Add internal API methods for pool-based instantiation (#6350)
Diffstat (limited to 'src/smt')
-rw-r--r--src/smt/smt_engine.cpp8
-rw-r--r--src/smt/smt_engine.h11
2 files changed, 19 insertions, 0 deletions
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp
index 55bf68b9f..3eedfdf53 100644
--- a/src/smt/smt_engine.cpp
+++ b/src/smt/smt_engine.cpp
@@ -1135,6 +1135,14 @@ Result SmtEngine::checkSynth()
--------------------------------------------------------------------------
*/
+void SmtEngine::declarePool(const Node& p, const std::vector<Node>& initValue)
+{
+ Assert(p.isVar() && p.getType().isSet());
+ finishInit();
+ QuantifiersEngine* qe = getAvailableQuantifiersEngine("declareTermPool");
+ qe->declarePool(p, initValue);
+}
+
Node SmtEngine::simplify(const Node& ex)
{
SmtScope smts(this);
diff --git a/src/smt/smt_engine.h b/src/smt/smt_engine.h
index 51eed32b2..3ef190447 100644
--- a/src/smt/smt_engine.h
+++ b/src/smt/smt_engine.h
@@ -497,6 +497,17 @@ class CVC4_EXPORT SmtEngine
/*------------------------- end of sygus commands ------------------------*/
/**
+ * Declare pool whose initial value is the terms in initValue. A pool is
+ * a variable of type (Set T) that is used in quantifier annotations and does
+ * not occur in constraints.
+ *
+ * @param p The pool to declare, which should be a variable of type (Set T)
+ * for some type T.
+ * @param initValue The initial value of p, which should be a vector of terms
+ * of type T.
+ */
+ void declarePool(const Node& p, const std::vector<Node>& initValue);
+ /**
* Simplify a formula without doing "much" work. Does not involve
* the SAT Engine in the simplification, but uses the current
* definitions, assertions, and the current partial model, if one
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback