summaryrefslogtreecommitdiff
path: root/test/api
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-11-03 11:12:18 -0500
committerGitHub <noreply@github.com>2021-11-03 16:12:18 +0000
commitd527b3f2501410770a76977efa180009e06ea172 (patch)
tree2740aea9ed89c510e5ccb14b89ca91822609978b /test/api
parent324434a74b35d0e58bdb551c9155e9fb32844d07 (diff)
Formalize more string skolems (#7554)
This properly formalizes all string skolems used in reduction and preprocessing. This avoids proof checking failures due to non-deterministism when checking steps for these modules. Fixes cvc5/cvc5-projects#334. Fixes cvc5/cvc5-projects#331.
Diffstat (limited to 'test/api')
-rw-r--r--test/api/CMakeLists.txt1
-rw-r--r--test/api/proj-issue306.cpp16
-rw-r--r--test/api/proj-issue334.cpp36
3 files changed, 53 insertions, 0 deletions
diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt
index f6c1cf8df..56adf73e7 100644
--- a/test/api/CMakeLists.txt
+++ b/test/api/CMakeLists.txt
@@ -53,6 +53,7 @@ cvc5_add_api_test(issue5074)
cvc5_add_api_test(issue4889)
cvc5_add_api_test(issue6111)
cvc5_add_api_test(proj-issue306)
+cvc5_add_api_test(proj-issue334)
# if we've built using libedit, then we want the interactive shell tests
if (USE_EDITLINE)
diff --git a/test/api/proj-issue306.cpp b/test/api/proj-issue306.cpp
index 664536a0b..35ecda567 100644
--- a/test/api/proj-issue306.cpp
+++ b/test/api/proj-issue306.cpp
@@ -1,3 +1,19 @@
+/******************************************************************************
+ * Top contributors (to current version):
+ * Andrew Reynolds
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * Test for project issue #306
+ *
+ */
+
#include "api/cpp/cvc5.h"
using namespace cvc5::api;
diff --git a/test/api/proj-issue334.cpp b/test/api/proj-issue334.cpp
new file mode 100644
index 000000000..bbb7f1a46
--- /dev/null
+++ b/test/api/proj-issue334.cpp
@@ -0,0 +1,36 @@
+/******************************************************************************
+ * Top contributors (to current version):
+ * Andrew Reynolds
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * Test for project issue #334
+ *
+ */
+
+#include "api/cpp/cvc5.h"
+
+using namespace cvc5::api;
+
+int main(void)
+{
+ Solver slv;
+ slv.setOption("produce-unsat-cores", "true");
+ Sort s1 = slv.mkBitVectorSort(1);
+ Sort s2 = slv.mkFloatingPointSort(8, 24);
+ Term val = slv.mkBitVector(32, "10000000110010111010111011000101", 2);
+ Term t1 = slv.mkFloatingPoint(8, 24, val);
+ Term t2 = slv.mkConst(s1);
+ Term t4 = slv.mkTerm(Kind::BITVECTOR_TO_NAT, t2);
+ Term t5 = slv.mkTerm(Kind::STRING_FROM_CODE, t4);
+ Term t6 = slv.simplify(t5);
+ Term t7 = slv.mkTerm(Kind::STRING_LEQ, t5, t6);
+ slv.assertFormula(t7);
+ slv.simplify(t1);
+}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback