diff options
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution')
4 files changed, 58 insertions, 4 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/GenerationTaskExecutor.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/GenerationTaskExecutor.xtend index 1f52c4b3..aa98e268 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/GenerationTaskExecutor.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/GenerationTaskExecutor.xtend | |||
@@ -184,6 +184,9 @@ class GenerationTaskExecutor { | |||
184 | 184 | ||
185 | console.writeMessage("Model generation started") | 185 | console.writeMessage("Model generation started") |
186 | for(run : 1..runs) { | 186 | for(run : 1..runs) { |
187 | if(run > 1) { | ||
188 | ScriptExecutor::restForMeasurements(console) | ||
189 | } | ||
187 | monitor.subTask('''Solving problem«IF runs>0» «run»/«runs»«ENDIF»''') | 190 | monitor.subTask('''Solving problem«IF runs>0» «run»/«runs»«ENDIF»''') |
188 | val visualisationProgressMonitor= new EclipseBasedProgressMonitor(monitor) | 191 | val visualisationProgressMonitor= new EclipseBasedProgressMonitor(monitor) |
189 | 192 | ||
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScriptConsole.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScriptConsole.xtend index 91d3d286..cfb1f09b 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScriptConsole.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScriptConsole.xtend | |||
@@ -39,7 +39,7 @@ class ScriptConsole { | |||
39 | val statisticsHeaderBuffer = new LinkedHashSet<String> | 39 | val statisticsHeaderBuffer = new LinkedHashSet<String> |
40 | val statisticsDataBuffer = new LinkedList<Map<String,? extends Object>> | 40 | val statisticsDataBuffer = new LinkedList<Map<String,? extends Object>> |
41 | 41 | ||
42 | static val delimier = ';' | 42 | static val delimier = ',' |
43 | static val empty = "" | 43 | static val empty = "" |
44 | 44 | ||
45 | public new( | 45 | public new( |
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScriptExecutor.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScriptExecutor.xtend index c9ec68bb..04449a74 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScriptExecutor.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScriptExecutor.xtend | |||
@@ -4,6 +4,7 @@ import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigRef | |||
4 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigSpecification | 4 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigSpecification |
5 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript | 5 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript |
6 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.CustomEntry | 6 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.CustomEntry |
7 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.DocumentLevelSpecification | ||
7 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.DocumentationEntry | 8 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.DocumentationEntry |
8 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.EPackageImport | 9 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.EPackageImport |
9 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.FileReference | 10 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.FileReference |
@@ -24,11 +25,10 @@ import hu.bme.mit.inf.dslreasoner.application.execution.util.ApplicationConfigur | |||
24 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel | 25 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel |
25 | import java.util.LinkedHashMap | 26 | import java.util.LinkedHashMap |
26 | import java.util.Optional | 27 | import java.util.Optional |
27 | import org.eclipse.emf.common.util.URI | ||
28 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.DocumentLevelSpecification | ||
29 | import org.eclipse.core.runtime.jobs.Job | ||
30 | import org.eclipse.core.runtime.IProgressMonitor | 28 | import org.eclipse.core.runtime.IProgressMonitor |
31 | import org.eclipse.core.runtime.Status | 29 | import org.eclipse.core.runtime.Status |
30 | import org.eclipse.core.runtime.jobs.Job | ||
31 | import org.eclipse.emf.common.util.URI | ||
32 | 32 | ||
33 | class ScriptExecutor { | 33 | class ScriptExecutor { |
34 | val parser = new ApplicationConfigurationParser | 34 | val parser = new ApplicationConfigurationParser |
@@ -56,8 +56,12 @@ class ScriptExecutor { | |||
56 | public def executeScript(ConfigurationScript script, IProgressMonitor monitor) { | 56 | public def executeScript(ConfigurationScript script, IProgressMonitor monitor) { |
57 | script.activateAllEPackageReferences | 57 | script.activateAllEPackageReferences |
58 | val tasks = script.commands.filter(Task) | 58 | val tasks = script.commands.filter(Task) |
59 | val intermediateScriptConsole = new ScriptConsole(true,false,null,null,null) | ||
59 | 60 | ||
60 | for(taskIndex : 0..<tasks.size) { | 61 | for(taskIndex : 0..<tasks.size) { |
62 | if(taskIndex>0) { | ||
63 | restForMeasurements(intermediateScriptConsole) | ||
64 | } | ||
61 | val task = tasks.get(taskIndex) | 65 | val task = tasks.get(taskIndex) |
62 | monitor.beginTask('''Executing task«IF tasks.size>1» «taskIndex+1»«ENDIF»: «task.name»''',task.totalWork) | 66 | monitor.beginTask('''Executing task«IF tasks.size>1» «taskIndex+1»«ENDIF»: «task.name»''',task.totalWork) |
63 | task.execute(monitor) | 67 | task.execute(monitor) |
@@ -234,4 +238,14 @@ class ScriptExecutor { | |||
234 | } | 238 | } |
235 | } | 239 | } |
236 | } | 240 | } |
241 | static val boolean measuring = true | ||
242 | static def restForMeasurements(ScriptConsole console) { | ||
243 | if(measuring) { | ||
244 | if(console !== null) { | ||
245 | console.writeMessage('''Cleaning memory.''') | ||
246 | } | ||
247 | System.gc System.gc System.gc | ||
248 | Thread.sleep(2500) | ||
249 | } | ||
250 | } | ||
237 | } \ No newline at end of file | 251 | } \ No newline at end of file |
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend index 3f0ba03f..e1d01cb5 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend | |||
@@ -87,6 +87,43 @@ class SolverLoader { | |||
87 | ] | 87 | ] |
88 | } catch (NumberFormatException e) {console.writeError('''Malformed number format: «e.message»''')} | 88 | } catch (NumberFormatException e) {console.writeError('''Malformed number format: «e.message»''')} |
89 | } | 89 | } |
90 | if(config.containsKey("numeric-solver-at-end")) { | ||
91 | val stringValue = config.get("numeric-solver-at-end") | ||
92 | if(stringValue.equals("true")) { | ||
93 | println("numeric-solver-at-end") | ||
94 | c.runIntermediateNumericalConsistencyChecks= false | ||
95 | } | ||
96 | } | ||
97 | if(config.containsKey("fitness-punishSize")) { | ||
98 | val stringValue = config.get("fitness-punishSize") | ||
99 | try { | ||
100 | c.punishSize = Boolean.parseBoolean(stringValue) | ||
101 | } catch(Exception e) {} | ||
102 | } | ||
103 | if(config.containsKey("fitness-scope")) { | ||
104 | val stringValue = config.get("fitness-scope") | ||
105 | try { | ||
106 | c.scopeWeight = Integer.parseInt(stringValue) | ||
107 | } catch(Exception e) {} | ||
108 | } | ||
109 | if(config.containsKey("fitness-missing-containent")) { | ||
110 | val stringValue = config.get("fitness-missing-containent") | ||
111 | try { | ||
112 | c.conaintmentWeight = Integer.parseInt(stringValue) | ||
113 | } catch(Exception e) {} | ||
114 | } | ||
115 | if(config.containsKey("fitness-missing-noncontainent")) { | ||
116 | val stringValue = config.get("fitness-missing-noncontainent") | ||
117 | try { | ||
118 | c.nonContainmentWeight = Integer.parseInt(stringValue) | ||
119 | } catch(Exception e) {} | ||
120 | } | ||
121 | if(config.containsKey("fitness-missing-wf")) { | ||
122 | val stringValue = config.get("fitness-missing-wf") | ||
123 | try { | ||
124 | c.unfinishedWFWeight = Integer.parseInt(stringValue) | ||
125 | } catch(Exception e) {} | ||
126 | } | ||
90 | ] | 127 | ] |
91 | } else { | 128 | } else { |
92 | throw new UnsupportedOperationException('''Unknown solver: «solver»''') | 129 | throw new UnsupportedOperationException('''Unknown solver: «solver»''') |