File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ cvc5_add_api_test(two_solvers)
58
58
cvc5_add_api_test (issue5074 )
59
59
cvc5_add_api_test (issue4889 )
60
60
cvc5_add_api_test (issue6111 )
61
+ cvc5_add_api_test (javasmt-bug347 )
61
62
cvc5_add_api_test (proj-issue306 )
62
63
cvc5_add_api_test (proj-issue334 )
63
64
cvc5_add_api_test (proj-issue344 )
Original file line number Diff line number Diff line change
1
+ /* *****************************************************************************
2
+ * Top contributors (to current version):
3
+ * Morgan Deters, Andrew Reynolds, Mathias Preiner
4
+ *
5
+ * This file is part of the cvc5 project.
6
+ *
7
+ * Copyright (c) 2009-2023 by the authors listed in the file AUTHORS
8
+ * in the top-level source directory and their institutional affiliations.
9
+ * All rights reserved. See the file COPYING in the top-level source
10
+ * directory for licensing information.
11
+ * ****************************************************************************
12
+ *
13
+ * Test for JavaSMT bug #347
14
+ * https://github.com/sosy-lab/java-smt/issues/347
15
+ */
16
+
17
+ #include < cassert>
18
+ #include < cvc5/cvc5.h>
19
+ #include < iostream>
20
+ #include < thread>
21
+
22
+ using namespace cvc5 ;
23
+
24
+ void task () {
25
+ Solver* solver = new Solver ();
26
+ Term formula = solver->mkBoolean (false );
27
+
28
+ solver->push ();
29
+ solver->assertFormula (formula);
30
+
31
+ assert (!solver->checkSat ().isSat ());
32
+
33
+ delete solver;
34
+ };
35
+
36
+ int main () {
37
+ for (int k=0 ; k < 100 ; k++) {
38
+ std::cout << k << std::endl;
39
+
40
+ std::thread t1 (task);
41
+ std::thread t2 (task);
42
+
43
+ t1.join ();
44
+ t2.join ();
45
+ }
46
+ }
You can’t perform that action at this time.
0 commit comments