File tree 2 files changed +60
-0
lines changed
2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ set(java_test_src_files
36
36
${CMAKE_CURRENT_SOURCE_DIR} /SynthResultTest.java
37
37
${CMAKE_CURRENT_SOURCE_DIR} /TermTest.java
38
38
${CMAKE_CURRENT_SOURCE_DIR} /ProofTest.java
39
+ ${CMAKE_CURRENT_SOURCE_DIR} /JavaSmtBug437.java
39
40
)
40
41
41
42
# build junit tests
@@ -82,5 +83,6 @@ cvc5_add_java_api_test(SymbolManagerTest)
82
83
cvc5_add_java_api_test(SynthResultTest)
83
84
cvc5_add_java_api_test(TermTest)
84
85
cvc5_add_java_api_test(ProofTest)
86
+ cvc5_add_java_api_test(JavaSmtBug437)
85
87
86
88
cvc5_add_unit_test_white(UncoveredTest api/java)
Original file line number Diff line number Diff line change
1
+ /******************************************************************************
2
+ * Top contributors (to current version):
3
+ * Andrew Reynolds, Mudathir Mohamed
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
+ package tests ;
18
+
19
+ import io .github .cvc5 .*;
20
+ import org .junit .jupiter .api .Test ;
21
+
22
+ class JavaSmtBug437 {
23
+ private class Task extends Thread {
24
+ @ Override
25
+ public void run () {
26
+ try {
27
+ Solver solver = new Solver ();
28
+ Term formula = solver .mkBoolean (false );
29
+
30
+ solver .push ();
31
+ solver .assertFormula (formula );
32
+
33
+ assert !solver .checkSat ().isSat ();
34
+
35
+ solver .deletePointer (); // Remove this line to fix
36
+
37
+ } catch (CVC5ApiException pE ) {
38
+ throw new RuntimeException (pE );
39
+ }
40
+ }
41
+ }
42
+
43
+ @ Test
44
+ public void bug347BrokenTest () throws InterruptedException {
45
+ for (int k = 0 ; k < 100 ; k ++) {
46
+ System .out .println (k );
47
+
48
+ Task t1 = new Task ();
49
+ t1 .start ();
50
+
51
+ Task t2 = new Task ();
52
+ t2 .start ();
53
+
54
+ t1 .join ();
55
+ t2 .join ();
56
+ }
57
+ }
58
+ }
You can’t perform that action at this time.
0 commit comments