diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2021-08-30 14:10:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-30 14:10:27 -0500 |
commit | 9b89eb1c0a7c2e9b5be9b9a80e9e24473454ce52 (patch) | |
tree | c41341609ed64dbf1c096d316ca46f853ddb0a8e /src/theory/quantifiers/quant_split.cpp | |
parent | 7372eab3e013b45516f499e0096e615a124ecfd4 (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.cpp | 12 |
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()) |