This kind is hardcoded only to work for sygus. I am not sure we want to support general constraints over it, or even if the token dt.size is the appropriate one.
Also adds a missing experimental warning that I had missed.
Fixes cvc5/cvc5-projects#504.
KIND_ENUM(APPLY_CONSTRUCTOR, internal::Kind::APPLY_CONSTRUCTOR),
KIND_ENUM(APPLY_TESTER, internal::Kind::APPLY_TESTER),
KIND_ENUM(APPLY_UPDATER, internal::Kind::APPLY_UPDATER),
- KIND_ENUM(DT_SIZE, internal::Kind::DT_SIZE),
KIND_ENUM(MATCH, internal::Kind::MATCH),
KIND_ENUM(MATCH_CASE, internal::Kind::MATCH_CASE),
KIND_ENUM(MATCH_BIND_CASE, internal::Kind::MATCH_BIND_CASE),
{internal::Kind::APPLY_CONSTRUCTOR, APPLY_CONSTRUCTOR},
{internal::Kind::APPLY_TESTER, APPLY_TESTER},
{internal::Kind::APPLY_UPDATER, APPLY_UPDATER},
- {internal::Kind::DT_SIZE, DT_SIZE},
{internal::Kind::MATCH, MATCH},
{internal::Kind::MATCH_CASE, MATCH_CASE},
{internal::Kind::MATCH_BIND_CASE, MATCH_BIND_CASE},
* - Arity: `0`
* - Create Term of this Kind with:
* - Solver::mkCardinalityConstraint(const Sort&, uint32_t) const
+ *
+ * \rst
+ * .. warning:: This kind is experimental and may be changed or removed in
+ * future versions.
+ * \endrst
*/
CARDINALITY_CONSTRAINT,
/**
* - Solver::mkOp(Kind, const std::vector<uint32_t>&) const
*/
MATCH_BIND_CASE,
- /**
- * Datatypes size operator.
- *
- * An operator mapping a datatype term to an integer denoting the number of
- * non-nullary applications of constructors it contains.
- *
- * - Arity: `1`
- * - `1:` Term of datatype Sort
- *
- * - Create Term of this Kind with:
- * - Solver::mkTerm(Kind, const std::vector<Term>&) const
- * - Solver::mkTerm(const Op&, const std::vector<Term>&) const
- *
- * - Create Op of this kind with:
- * - Solver::mkOp(Kind, const std::vector<uint32_t>&) const
- */
- DT_SIZE,
/**
* Tuple projection.
*
if (!strictModeEnabled())
{
Parser::addOperator(cvc5::APPLY_UPDATER);
- addOperator(cvc5::DT_SIZE, "dt.size");
// Notice that tuple operators, we use the generic APPLY_SELECTOR and
// APPLY_UPDATER kinds. These are processed based on the context
// in which they are parsed, e.g. when parsing identifiers.
# constructor applications are constant if they are applied only to constants
construle APPLY_CONSTRUCTOR ::cvc5::internal::theory::datatypes::DatatypeConstructorTypeRule
+# the remaining kinds are used only by the sygus extension
operator DT_SIZE 1 "datatypes size"
typerule DT_SIZE ::cvc5::internal::theory::datatypes::DtSizeTypeRule
Sort s5 = slv.mkSequenceSort(s2);
Term t3 = slv.mkConst(s5, "_x18");
Term t7 = slv.mkConst(s4, "_x22");
- Term t13 = slv.mkTerm(Kind::DT_SIZE, {t7});
+ // was initially a dt size application
+ Term t13 = slv.mkConst(slv.getIntegerSort(), "t13");
Term t53 = slv.mkTerm(Kind::SEQ_NTH, {t3, t13});
ASSERT_NO_THROW(slv.checkSat());
ASSERT_NO_THROW(slv.blockModelValues({t53, t7}));