diff options
author | OszkarSemerath <oszkar.semerath@gmail.com> | 2018-02-25 22:39:10 -0500 |
---|---|---|
committer | OszkarSemerath <oszkar.semerath@gmail.com> | 2018-02-25 22:39:10 -0500 |
commit | bb1c86e0c99adead52edde0cb60dcb7f7ef6ea2d (patch) | |
tree | 21e19d490b63c40538383584ec931c576ca9e874 /Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder | |
parent | Config file: documentation -> log-level (diff) | |
download | VIATRA-Generator-bb1c86e0c99adead52edde0cb60dcb7f7ef6ea2d.tar.gz VIATRA-Generator-bb1c86e0c99adead52edde0cb60dcb7f7ef6ea2d.tar.zst VIATRA-Generator-bb1c86e0c99adead52edde0cb60dcb7f7ef6ea2d.zip |
Alloy solver use the als file for logging only
And not for parsing
Diffstat (limited to 'Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder')
-rw-r--r-- | Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend index b78165dc..51cc8c42 100644 --- a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend | |||
@@ -48,7 +48,7 @@ class AlloyHandler { | |||
48 | 48 | ||
49 | //val fileName = "problem.als" | 49 | //val fileName = "problem.als" |
50 | 50 | ||
51 | public def callSolver(ALSDocument problem, ReasonerWorkspace workspace, AlloySolverConfiguration configuration, String path, String alloyCode) { | 51 | public def callSolver(ALSDocument problem, ReasonerWorkspace workspace, AlloySolverConfiguration configuration,String alloyCode) { |
52 | val writeToFile = ( | 52 | val writeToFile = ( |
53 | configuration.documentationLevel===DocumentationLevel::NORMAL || | 53 | configuration.documentationLevel===DocumentationLevel::NORMAL || |
54 | configuration.documentationLevel===DocumentationLevel::FULL) | 54 | configuration.documentationLevel===DocumentationLevel::FULL) |
@@ -83,11 +83,7 @@ class AlloyHandler { | |||
83 | // Start: Alloy -> Kodkod | 83 | // Start: Alloy -> Kodkod |
84 | val kodkodTransformStart = System.currentTimeMillis(); | 84 | val kodkodTransformStart = System.currentTimeMillis(); |
85 | try { | 85 | try { |
86 | if(writeToFile) { | 86 | compModule = CompUtil.parseEverything_fromString(reporter,alloyCode) |
87 | compModule = CompUtil.parseEverything_fromFile(reporter,null,path) | ||
88 | } else { | ||
89 | compModule = CompUtil.parseEverything_fromString(reporter,alloyCode) | ||
90 | } | ||
91 | if(compModule.allCommands.size != 1) | 87 | if(compModule.allCommands.size != 1) |
92 | throw new UnsupportedOperationException('''Alloy files with multiple commands are not supported!''') | 88 | throw new UnsupportedOperationException('''Alloy files with multiple commands are not supported!''') |
93 | command = compModule.allCommands.head | 89 | command = compModule.allCommands.head |