forked from cvc5/cvc5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(C++) Added test cases for sosy-lab/java-smt#310
- Loading branch information
1 parent
de8dc61
commit 34d7bbb
Showing
4 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/****************************************************************************** | ||
* Top contributors (to current version): | ||
* Morgan Deters, Andrew Reynolds, Mathias Preiner | ||
* | ||
* This file is part of the cvc5 project. | ||
* | ||
* Copyright (c) 2009-2023 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 JavaSMT bug #310 | ||
* https://github.com/sosy-lab/java-smt/issues/310 | ||
*/ | ||
|
||
#include <cvc5/cvc5.h> | ||
#include <thread> | ||
|
||
using namespace cvc5; | ||
|
||
void parallel1(Solver& solver) { | ||
// FIXME: | ||
// Fatal failure within | ||
// void NodeManager::poolRemove(expr::NodeValue*) | ||
// at /home/daniel/workspace/cvc5/build/src/expr/node_manager.h:1083 | ||
// | ||
// Check failure d_nodeValuePool.find(nv) != d_nodeValuePool.end() | ||
// NodeValue is not in the pool! | ||
solver.getBooleanSort(); | ||
}; | ||
|
||
int main() { | ||
Solver solver; | ||
|
||
std::thread task(parallel1, std::ref(solver)); | ||
task.join(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/****************************************************************************** | ||
* Top contributors (to current version): | ||
* Morgan Deters, Andrew Reynolds, Mathias Preiner | ||
* | ||
* This file is part of the cvc5 project. | ||
* | ||
* Copyright (c) 2009-2023 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 JavaSMT bug #310 | ||
* https://github.com/sosy-lab/java-smt/issues/310 | ||
*/ | ||
|
||
#include <cvc5/cvc5.h> | ||
#include <thread> | ||
|
||
using namespace cvc5; | ||
|
||
void parallel2(Term& formula) { | ||
Solver prover; | ||
// FIXME: | ||
// terminate called after throwing an instance of 'cvc5::CVC5ApiException' | ||
// what(): | ||
// Given term is not associated with the node manager of this solver | ||
prover.assertFormula(formula); | ||
}; | ||
|
||
int main() { | ||
Solver solver; | ||
Term formula = solver.mkFalse(); | ||
|
||
std::thread task(parallel2, std::ref(formula)); | ||
task.join(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/****************************************************************************** | ||
* Top contributors (to current version): | ||
* Morgan Deters, Andrew Reynolds, Mathias Preiner | ||
* | ||
* This file is part of the cvc5 project. | ||
* | ||
* Copyright (c) 2009-2023 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 JavaSMT bug #310 | ||
* https://github.com/sosy-lab/java-smt/issues/310 | ||
*/ | ||
|
||
#include <cvc5/cvc5.h> | ||
#include <thread> | ||
|
||
using namespace cvc5; | ||
|
||
void parallel3(Solver& solver) { | ||
solver.push(); | ||
}; | ||
|
||
int main() { | ||
Solver solver; | ||
Term varA = solver.mkConst(solver.getBooleanSort(), "a"); | ||
|
||
solver.assertFormula(varA); | ||
|
||
std::thread task(parallel3, std::ref(solver)); | ||
task.join(); | ||
} |