diff options
author | 2021-02-16 03:06:22 +0100 | |
---|---|---|
committer | 2021-02-16 03:06:22 +0100 | |
commit | 0ebddc8dd265cd5b1b439e3c06f1de1047641559 (patch) | |
tree | 7141673072f4d6a48a9b12d23b9f01261717a8f7 /Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme | |
parent | Ready for strategies case study (diff) | |
download | VIATRA-Generator-0ebddc8dd265cd5b1b439e3c06f1de1047641559.tar.gz VIATRA-Generator-0ebddc8dd265cd5b1b439e3c06f1de1047641559.tar.zst VIATRA-Generator-0ebddc8dd265cd5b1b439e3c06f1de1047641559.zip |
add dreal-timeout flag
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme')
2 files changed, 6 insertions, 5 deletions
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java index f098d575..eb63d96a 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java +++ b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java | |||
@@ -43,13 +43,14 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ | |||
43 | private Map<String, String> curVar2Decl; | 43 | private Map<String, String> curVar2Decl; |
44 | 44 | ||
45 | private final int TIMEOUT_DOCKER = 5000; | 45 | private final int TIMEOUT_DOCKER = 5000; |
46 | private final int TIMEOUT_LOCAL = -1; | 46 | private int TIMEOUT_LOCAL = -1; |
47 | private final int DEBUG_PRINT = 3; | 47 | private final int DEBUG_PRINT = 2; |
48 | 48 | ||
49 | public NumericDrealProblemSolver(boolean useDocker, String drealLocalPath) throws IOException, InterruptedException { | 49 | public NumericDrealProblemSolver(boolean useDocker, String drealLocalPath, int drealTimeout) throws IOException, InterruptedException { |
50 | this.useDocker = useDocker; | 50 | this.useDocker = useDocker; |
51 | this.varMap = new HashMap<Object, String>(); | 51 | this.varMap = new HashMap<Object, String>(); |
52 | this.drealLocalPath = drealLocalPath; | 52 | this.drealLocalPath = drealLocalPath; |
53 | this.TIMEOUT_LOCAL = drealTimeout; | ||
53 | 54 | ||
54 | if (useDocker) setupDocker(); | 55 | if (useDocker) setupDocker(); |
55 | } | 56 | } |
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDynamicProblemSolver.java b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDynamicProblemSolver.java index bd4a10ff..1e5c1f29 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDynamicProblemSolver.java +++ b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDynamicProblemSolver.java | |||
@@ -14,9 +14,9 @@ public class NumericDynamicProblemSolver extends NumericProblemSolver{ | |||
14 | // private NumericZ3ProblemSolver z3Solver; | 14 | // private NumericZ3ProblemSolver z3Solver; |
15 | private NumericDrealProblemSolver drealSolver; | 15 | private NumericDrealProblemSolver drealSolver; |
16 | 16 | ||
17 | public NumericDynamicProblemSolver(String drealLocalPath) throws IOException, InterruptedException { | 17 | public NumericDynamicProblemSolver(String drealLocalPath, int drealTimeout) throws IOException, InterruptedException { |
18 | // this.z3Solver = new NumericZ3ProblemSolver(); | 18 | // this.z3Solver = new NumericZ3ProblemSolver(); |
19 | this.drealSolver = new NumericDrealProblemSolver(false, drealLocalPath); | 19 | this.drealSolver = new NumericDrealProblemSolver(false, drealLocalPath, drealTimeout); |
20 | } | 20 | } |
21 | 21 | ||
22 | public NumericProblemSolver selectSolver(String selection) { | 22 | public NumericProblemSolver selectSolver(String selection) { |