summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/quant_split.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-08-30 14:10:27 -0500
committerGitHub <noreply@github.com>2021-08-30 14:10:27 -0500
commit9b89eb1c0a7c2e9b5be9b9a80e9e24473454ce52 (patch)
treec41341609ed64dbf1c096d316ca46f853ddb0a8e /src/theory/quantifiers/quant_split.cpp
parent7372eab3e013b45516f499e0096e615a124ecfd4 (diff)
Fix quantifiers dynamic split module for parametric datatypes (#7085)
Fixes #6838.
Diffstat (limited to 'src/theory/quantifiers/quant_split.cpp')
-rw-r--r--src/theory/quantifiers/quant_split.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/theory/quantifiers/quant_split.cpp b/src/theory/quantifiers/quant_split.cpp
index cc2525b78..941b94d23 100644
--- a/src/theory/quantifiers/quant_split.cpp
+++ b/src/theory/quantifiers/quant_split.cpp
@@ -17,9 +17,10 @@
#include "expr/dtype.h"
#include "expr/dtype_cons.h"
-#include "theory/quantifiers/term_database.h"
-#include "theory/quantifiers/first_order_model.h"
#include "options/quantifiers_options.h"
+#include "theory/datatypes/theory_datatypes_utils.h"
+#include "theory/quantifiers/first_order_model.h"
+#include "theory/quantifiers/term_database.h"
using namespace cvc5::kind;
@@ -164,17 +165,18 @@ void QuantDSplit::check(Theory::Effort e, QEffort quant_e)
for (unsigned j = 0, ncons = dt.getNumConstructors(); j < ncons; j++)
{
std::vector<Node> vars;
+ TypeNode dtjtn = dt[j].getSpecializedConstructorType(tn);
+ Assert(dtjtn.getNumChildren() == dt[j].getNumArgs() + 1);
for (unsigned k = 0, nargs = dt[j].getNumArgs(); k < nargs; k++)
{
- TypeNode tns = dt[j][k].getRangeType();
+ TypeNode tns = dtjtn[k];
Node v = nm->mkBoundVar(tns);
vars.push_back(v);
}
std::vector<Node> bvs_cmb;
bvs_cmb.insert(bvs_cmb.end(), bvs.begin(), bvs.end());
bvs_cmb.insert(bvs_cmb.end(), vars.begin(), vars.end());
- vars.insert(vars.begin(), dt[j].getConstructor());
- Node c = nm->mkNode(kind::APPLY_CONSTRUCTOR, vars);
+ Node c = datatypes::utils::mkApplyCons(tn, dt, j, vars);
TNode ct = c;
Node body = q[1].substitute(svar, ct);
if (!bvs_cmb.empty())
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback