aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend
diff options
context:
space:
mode:
Diffstat (limited to 'Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend')
-rw-r--r--Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend8
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