diff options
author | 2021-02-16 01:11:15 +0100 | |
---|---|---|
committer | 2021-02-16 01:11:15 +0100 | |
commit | acb8dedc9d03e1d17f570e07c9f75a571bd66cf8 (patch) | |
tree | 56d4f9899af7c70fa006395ffb0b93ff339fac7b /Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf | |
parent | Minor adjsutments to CrossScen ad FamTree local case studies (diff) | |
download | VIATRA-Generator-acb8dedc9d03e1d17f570e07c9f75a571bd66cf8.tar.gz VIATRA-Generator-acb8dedc9d03e1d17f570e07c9f75a571bd66cf8.tar.zst VIATRA-Generator-acb8dedc9d03e1d17f570e07c9f75a571bd66cf8.zip |
Ready for strategies case study
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java | 8 |
1 files changed, 5 insertions, 3 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 70aa933a..f098d575 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,7 +43,7 @@ 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 = 100000; | 46 | private final int TIMEOUT_LOCAL = -1; |
47 | private final int DEBUG_PRINT = 3; | 47 | private final int DEBUG_PRINT = 3; |
48 | 48 | ||
49 | public NumericDrealProblemSolver(boolean useDocker, String drealLocalPath) throws IOException, InterruptedException { | 49 | public NumericDrealProblemSolver(boolean useDocker, String drealLocalPath) throws IOException, InterruptedException { |
@@ -75,7 +75,9 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ | |||
75 | // p.waitFor(); | 75 | // p.waitFor(); |
76 | //TODO timeout if needed | 76 | //TODO timeout if needed |
77 | long startTime = System.nanoTime(); | 77 | long startTime = System.nanoTime(); |
78 | if (!p.waitFor(timeout, TimeUnit.MILLISECONDS)) { | 78 | if (timeout == -1) { |
79 | p.waitFor(); | ||
80 | } else if (!p.waitFor(timeout, TimeUnit.MILLISECONDS)) { | ||
79 | p.destroy(); | 81 | p.destroy(); |
80 | if (p.isAlive()) { | 82 | if (p.isAlive()) { |
81 | p.destroyForcibly(); | 83 | p.destroyForcibly(); |
@@ -406,6 +408,7 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ | |||
406 | //CREATE DREAL STM2 FILE CONTENTS | 408 | //CREATE DREAL STM2 FILE CONTENTS |
407 | long startformingProblem = System.nanoTime(); | 409 | long startformingProblem = System.nanoTime(); |
408 | List<String> numProbContent = formNumericProblemInstance(matches); | 410 | List<String> numProbContent = formNumericProblemInstance(matches); |
411 | if (DEBUG_PRINT > 2) printOutput(numProbContent); | ||
409 | endformingProblem = System.nanoTime()-startformingProblem; | 412 | endformingProblem = System.nanoTime()-startformingProblem; |
410 | 413 | ||
411 | if (numProbContent == null) { | 414 | if (numProbContent == null) { |
@@ -446,7 +449,6 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ | |||
446 | System.out.println(result); | 449 | System.out.println(result); |
447 | } | 450 | } |
448 | if (DEBUG_PRINT > 2) { | 451 | if (DEBUG_PRINT > 2) { |
449 | printOutput(numProbContent); | ||
450 | if (outputs != null) printOutput(outputs.get(0)); | 452 | if (outputs != null) printOutput(outputs.get(0)); |
451 | } | 453 | } |
452 | 454 | ||