summaryrefslogtreecommitdiff
path: root/src/api/cpp
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2021-11-10 13:10:16 -0800
committerGitHub <noreply@github.com>2021-11-10 21:10:16 +0000
commit4877909b806329e5e0e14dcfc3c404b8e4f6c0af (patch)
tree3dcc6162d289261328c8bf2e808f1e76fd4f8eae /src/api/cpp
parente57c53e8a3c518a00cf52f199d14fbec94bdaca8 (diff)
api: Add Solver::mkRegexpAll(). (#7614)
Diffstat (limited to 'src/api/cpp')
-rw-r--r--src/api/cpp/cvc5.cpp13
-rw-r--r--src/api/cpp/cvc5.h14
2 files changed, 23 insertions, 4 deletions
diff --git a/src/api/cpp/cvc5.cpp b/src/api/cpp/cvc5.cpp
index ae0ee2ceb..4dcfb466e 100644
--- a/src/api/cpp/cvc5.cpp
+++ b/src/api/cpp/cvc5.cpp
@@ -5796,6 +5796,19 @@ Term Solver::mkReal(int64_t num, int64_t den) const
CVC5_API_TRY_CATCH_END;
}
+Term Solver::mkRegexpAll() const
+{
+ CVC5_API_TRY_CATCH_BEGIN;
+ //////// all checks before this line
+ Node res = d_nodeMgr->mkNode(
+ cvc5::kind::REGEXP_STAR,
+ d_nodeMgr->mkNode(cvc5::kind::REGEXP_ALLCHAR, std::vector<cvc5::Node>()));
+ (void)res.getType(true); /* kick off type checking */
+ return Term(this, res);
+ ////////
+ CVC5_API_TRY_CATCH_END;
+}
+
Term Solver::mkRegexpNone() const
{
CVC5_API_TRY_CATCH_BEGIN;
diff --git a/src/api/cpp/cvc5.h b/src/api/cpp/cvc5.h
index 91a6ae447..ab9a4de25 100644
--- a/src/api/cpp/cvc5.h
+++ b/src/api/cpp/cvc5.h
@@ -3443,18 +3443,24 @@ class CVC5_EXPORT Solver
Term mkReal(int64_t num, int64_t den) const;
/**
- * Create a regular expression none (re.none) term.
- * @return the empty term
+ * Create a regular expression all (re.all) term.
+ * @return the all term
*/
- Term mkRegexpNone() const;
+ Term mkRegexpAll() const;
/**
* Create a regular expression allchar (re.allchar) term.
- * @return the sigma term
+ * @return the allchar term
*/
Term mkRegexpAllchar() const;
/**
+ * Create a regular expression none (re.none) term.
+ * @return the none term
+ */
+ Term mkRegexpNone() const;
+
+ /**
* Create a constant representing an empty set of the given sort.
* @param sort the sort of the set elements.
* @return the empty set constant
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback