diff options
author | 2018-03-03 16:24:38 -0500 | |
---|---|---|
committer | 2018-03-03 16:24:38 -0500 | |
commit | 769b900ed48916536eeb61391dd69d0905fce9f3 (patch) | |
tree | 43b013d54661bf70c379086e23a09c9615d325fc /Application/hu.bme.mit.inf.dslreasoner.application/src | |
parent | Alloy solver report progress and does not call solver if cancelled (diff) | |
download | VIATRA-Generator-769b900ed48916536eeb61391dd69d0905fce9f3.tar.gz VIATRA-Generator-769b900ed48916536eeb61391dd69d0905fce9f3.tar.zst VIATRA-Generator-769b900ed48916536eeb61391dd69d0905fce9f3.zip |
Generation is executed in a job
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src')
3 files changed, 180 insertions, 130 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 33f59413..9ffd33c5 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 | |||
@@ -20,6 +20,8 @@ import hu.bme.mit.inf.dslreasoner.visualisation.pi2graphviz.GraphvizVisualisatio | |||
20 | import hu.bme.mit.inf.dslreasoner.workspace.ProjectWorkspace | 20 | import hu.bme.mit.inf.dslreasoner.workspace.ProjectWorkspace |
21 | import java.util.Optional | 21 | import java.util.Optional |
22 | import org.eclipse.emf.common.util.URI | 22 | import org.eclipse.emf.common.util.URI |
23 | import org.eclipse.core.runtime.IProgressMonitor | ||
24 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.SolverProgressMonitor | ||
23 | 25 | ||
24 | class GenerationTaskExecutor { | 26 | class GenerationTaskExecutor { |
25 | val metamodelLoader = new MetamodelLoader | 27 | val metamodelLoader = new MetamodelLoader |
@@ -33,10 +35,11 @@ class GenerationTaskExecutor { | |||
33 | 35 | ||
34 | def executeGenerationTask( | 36 | def executeGenerationTask( |
35 | GenerationTask task, | 37 | GenerationTask task, |
36 | ScriptExecutor scriptExecutor) | 38 | ScriptExecutor scriptExecutor, |
39 | IProgressMonitor monitor) | ||
37 | { | 40 | { |
41 | monitor.subTask('''Collecting all resources''') | ||
38 | // 1. Load all resources | 42 | // 1. Load all resources |
39 | |||
40 | val metamodelSpecification = scriptExecutor.getMetamodelSpecification(task.metamodel) | 43 | val metamodelSpecification = scriptExecutor.getMetamodelSpecification(task.metamodel) |
41 | val patternSpecification = scriptExecutor.getPatternSpecification(task.patterns) | 44 | val patternSpecification = scriptExecutor.getPatternSpecification(task.patterns) |
42 | val partialmodelSpecification = scriptExecutor.getPartialModelSpecification(task.partialModel) | 45 | val partialmodelSpecification = scriptExecutor.getPartialModelSpecification(task.partialModel) |
@@ -52,153 +55,158 @@ class GenerationTaskExecutor { | |||
52 | val documentationLevel = scriptExecutor.getDocumentation(configSpecification) | 55 | val documentationLevel = scriptExecutor.getDocumentation(configSpecification) |
53 | val runtieLimit = scriptExecutor.getRuntimeLimit(configSpecification) | 56 | val runtieLimit = scriptExecutor.getRuntimeLimit(configSpecification) |
54 | val memoryLimit = scriptExecutor.getMemoryLimit(configSpecification) | 57 | val memoryLimit = scriptExecutor.getMemoryLimit(configSpecification) |
55 | // 2. create console | ||
56 | |||
57 | val reasonerWorkspace = if(debugFolder!== null) { | ||
58 | new ProjectWorkspace(debugFolder.path,"") | ||
59 | } else { | ||
60 | new NullWorkspace | ||
61 | } | ||
62 | reasonerWorkspace.initAndClear | ||
63 | val outputWorkspace = if(outputFolder !== null) { | ||
64 | new ProjectWorkspace(outputFolder.path,"") | ||
65 | } else { | ||
66 | new NullWorkspace | ||
67 | } | ||
68 | outputWorkspace.initAndClear | ||
69 | 58 | ||
59 | // 2. create console | ||
70 | val console = new ScriptConsole(true,true, | 60 | val console = new ScriptConsole(true,true, |
71 | if(messageFile!==null) URI.createURI(messageFile.path) else null, | 61 | if(messageFile!==null) URI.createURI(messageFile.path) else null, |
72 | if(debugFolder!==null) URI.createURI('''«debugFolder.path»/errors.txt''') else null, | 62 | if(debugFolder!==null) URI.createURI('''«debugFolder.path»/errors.txt''') else null, |
73 | if(statisticsFile!==null) URI.createURI(statisticsFile.path) else null | 63 | if(statisticsFile!==null) URI.createURI(statisticsFile.path) else null |
74 | ) | 64 | ) |
75 | 65 | ||
76 | // 3. interpret all specification to a description | 66 | try { |
77 | val metamodelDescriptor = if(metamodelSpecification !== null) { | 67 | val reasonerWorkspace = if(debugFolder!== null) { |
78 | metamodelLoader.loadMetamodel(metamodelSpecification) | 68 | new ProjectWorkspace(debugFolder.path,"") |
79 | } else { | ||
80 | console.writeError('''Error during the loading of the metamodel: No metamodel specified!''') | ||
81 | throw new IllegalArgumentException('''No metamodel is specified!''') | ||
82 | } | ||
83 | val queryDescriptor = if(patternSpecification !== null) { | ||
84 | this.queryLoader.loadQueries(patternSpecification) | ||
85 | } else { | ||
86 | null | ||
87 | } | ||
88 | val partialModelDescriptor = if(partialmodelSpecification !== null) { | ||
89 | this.modelLoader.loadModel(partialmodelSpecification,scriptExecutor) | ||
90 | } else { | ||
91 | null | ||
92 | } | ||
93 | |||
94 | // 4. translate all description to a logic problem | ||
95 | val Ecore2Logic ecore2Logic = new Ecore2Logic | ||
96 | val Logic2Ecore logic2Ecore = new Logic2Ecore(ecore2Logic) | ||
97 | val Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic) | ||
98 | val InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic | ||
99 | |||
100 | var modelGeneration = ecore2Logic.transformMetamodel(metamodelDescriptor,new Ecore2LogicConfiguration()) | ||
101 | var problem = modelGeneration.output | ||
102 | if(partialModelDescriptor !== null) { | ||
103 | problem = instanceModel2Logic.transform( | ||
104 | modelGeneration, | ||
105 | partialModelDescriptor | ||
106 | ).output | ||
107 | } | ||
108 | if(queryDescriptor !== null){ | ||
109 | problem = viatra2Logic.transformQueries( | ||
110 | queryDescriptor.key, | ||
111 | modelGeneration, | ||
112 | new Viatra2LogicConfiguration | ||
113 | ).output | ||
114 | } | ||
115 | if(documentationLevel.atLeastNormal) { | ||
116 | reasonerWorkspace.writeModel(problem,"generation.logicproblem") | ||
117 | } | ||
118 | |||
119 | // 5. create a solver and a configuration | ||
120 | // 5.1 initialize | ||
121 | val solver = solverLoader.loadSolver(task.solver,configurationMap) | ||
122 | val solverConfig = solverLoader.loadSolverConfig(task.solver,configurationMap,console) | ||
123 | |||
124 | |||
125 | // 5.2 set values that defined directly | ||
126 | solverConfig.solutionScope = new SolutionScope => [ | ||
127 | it.numberOfRequiredSolution = if(task.numberSpecified) { | ||
128 | task.number | ||
129 | } else { | 69 | } else { |
130 | 1 | 70 | new NullWorkspace |
131 | } | 71 | } |
132 | ] | 72 | reasonerWorkspace.init |
133 | solverConfig.typeScopes = scopeLoader.loadScope( | 73 | val outputWorkspace = if(outputFolder !== null) { |
134 | scopeSpecification, | 74 | new ProjectWorkspace(outputFolder.path,"") |
135 | problem, | 75 | } else { |
136 | ecore2Logic, | 76 | new NullWorkspace |
137 | modelGeneration.trace | 77 | } |
138 | ) | 78 | outputWorkspace.init |
139 | |||
140 | // 5.3 set resource limits | ||
141 | documentationLevel.ifPresent[solverConfig.documentationLevel = it] | ||
142 | runtieLimit.ifPresent[solverConfig.runtimeLimit = it] | ||
143 | memoryLimit.ifPresent[solverConfig.memoryLimit = it] | ||
144 | |||
145 | // 6. execute the solver on the problem with the configuration | ||
146 | // 6.1 calculating the runs | ||
147 | val runs = if(task.runSpecified) { task.runs } else { 1 } | ||
148 | console.writeMessage("Model generation started") | ||
149 | |||
150 | for(run : 1..runs) { | ||
151 | 79 | ||
152 | // 6.2 For each run, the configuration and the workspace is adjusted | 80 | // 3. interpret all specification to a description |
153 | solverLoader.setRunIndex(solverConfig,configurationMap,run,console) | 81 | val metamodelDescriptor = if(metamodelSpecification !== null) { |
154 | val reasonerWorkspaceForRun = if(runs > 1) { | 82 | metamodelLoader.loadMetamodel(metamodelSpecification) |
155 | reasonerWorkspace.subWorkspace('''run«run»''',"") => [initAndClear] | 83 | } else { |
84 | console.writeError('''Error during the loading of the metamodel: No metamodel specified!''') | ||
85 | throw new IllegalArgumentException('''No metamodel is specified!''') | ||
86 | } | ||
87 | val queryDescriptor = if(patternSpecification !== null) { | ||
88 | this.queryLoader.loadQueries(patternSpecification) | ||
156 | } else { | 89 | } else { |
157 | reasonerWorkspace | 90 | null |
158 | } | 91 | } |
92 | val partialModelDescriptor = if(partialmodelSpecification !== null) { | ||
93 | this.modelLoader.loadModel(partialmodelSpecification,scriptExecutor) | ||
94 | } else { | ||
95 | null | ||
96 | } | ||
97 | monitor.worked(50) | ||
159 | 98 | ||
99 | // 4. translate all description to a logic problem | ||
100 | monitor.subTask('''Translating all resources to logic''') | ||
101 | val Ecore2Logic ecore2Logic = new Ecore2Logic | ||
102 | val Logic2Ecore logic2Ecore = new Logic2Ecore(ecore2Logic) | ||
103 | val Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic) | ||
104 | val InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic | ||
160 | 105 | ||
161 | // 7. Solver call | 106 | var modelGeneration = ecore2Logic.transformMetamodel(metamodelDescriptor,new Ecore2LogicConfiguration()) |
107 | var problem = modelGeneration.output | ||
108 | if(partialModelDescriptor !== null) { | ||
109 | problem = instanceModel2Logic.transform( | ||
110 | modelGeneration, | ||
111 | partialModelDescriptor | ||
112 | ).output | ||
113 | } | ||
114 | if(queryDescriptor !== null){ | ||
115 | problem = viatra2Logic.transformQueries( | ||
116 | queryDescriptor.key, | ||
117 | modelGeneration, | ||
118 | new Viatra2LogicConfiguration | ||
119 | ).output | ||
120 | } | ||
121 | if(documentationLevel.atLeastNormal) { | ||
122 | reasonerWorkspace.writeModel(problem,"generation.logicproblem") | ||
123 | } | ||
162 | 124 | ||
163 | val solution = solver.solve(problem,solverConfig,reasonerWorkspaceForRun) | 125 | // 5. create a solver and a configuration |
126 | // 5.1 initialize | ||
127 | val solver = solverLoader.loadSolver(task.solver,configurationMap) | ||
128 | val solverConfig = solverLoader.loadSolverConfig(task.solver,configurationMap,console) | ||
164 | 129 | ||
165 | console.writeMessage(solution.soutionDescription.toString) | ||
166 | 130 | ||
167 | // 8. Solution processing | 131 | // 5.2 set values that defined directly |
168 | if(solution instanceof ModelResult) { | 132 | solverConfig.solutionScope = new SolutionScope => [ |
169 | // | 133 | it.numberOfRequiredSolution = if(task.numberSpecified) { |
170 | val interpretations = solver.getInterpretations(solution) | 134 | task.number |
171 | val outputWorkspaceForRun = if(runs > 1) { | ||
172 | outputWorkspace.subWorkspace('''run«run»''',"") => [initAndClear] | ||
173 | } else { | 135 | } else { |
174 | outputWorkspace | 136 | 1 |
175 | } | 137 | } |
138 | ] | ||
139 | solverConfig.typeScopes = scopeLoader.loadScope( | ||
140 | scopeSpecification, | ||
141 | problem, | ||
142 | ecore2Logic, | ||
143 | modelGeneration.trace | ||
144 | ) | ||
145 | |||
146 | // 5.3 set resource limits | ||
147 | documentationLevel.ifPresent[solverConfig.documentationLevel = it] | ||
148 | runtieLimit.ifPresent[solverConfig.runtimeLimit = it] | ||
149 | memoryLimit.ifPresent[solverConfig.memoryLimit = it] | ||
150 | |||
151 | // 6. execute the solver on the problem with the configuration | ||
152 | // 6.1 calculating the runs | ||
153 | val runs = if(task.runSpecified) { task.runs } else { 1 } | ||
154 | monitor.worked(50) | ||
155 | |||
156 | console.writeMessage("Model generation started") | ||
157 | for(run : 1..runs) { | ||
158 | monitor.subTask('''Solving problem«IF runs>0» «run»/«runs»«ENDIF»''') | ||
159 | |||
160 | // 6.2 For each run, the configuration and the workspace is adjusted | ||
161 | solverLoader.setRunIndex(solverConfig,configurationMap,run,console) | ||
162 | solverConfig.progressMonitor = new EclipseProgressMonitor(monitor) | ||
163 | val reasonerWorkspaceForRun = if(runs > 1) { | ||
164 | reasonerWorkspace.subWorkspace('''run«run»''',"") => [init] | ||
165 | } else { | ||
166 | reasonerWorkspace | ||
167 | } | ||
168 | |||
169 | // 7. Solver call | ||
170 | val solution = solver.solve(problem,solverConfig,reasonerWorkspaceForRun) | ||
171 | console.writeMessage(solution.soutionDescription.toString) | ||
176 | 172 | ||
177 | for(interpretationIndex : 0..<interpretations.size) { | 173 | // 8. Solution processing |
178 | val interpretation = interpretations.get(interpretationIndex) | 174 | if(solution instanceof ModelResult) { |
179 | val model = logic2Ecore.transformInterpretation(interpretation,modelGeneration.trace) | 175 | val interpretations = solver.getInterpretations(solution) |
180 | outputWorkspaceForRun.writeModel(model,'''model«IF runs>1»_«run»«ENDIF»_«interpretationIndex».xmi''') | 176 | val outputWorkspaceForRun = if(runs > 1) { |
177 | outputWorkspace.subWorkspace('''run«run»''',"") => [initAndClear] | ||
178 | } else { | ||
179 | outputWorkspace | ||
180 | } | ||
181 | 181 | ||
182 | val representation = solution.representation.get(interpretationIndex) | 182 | for(interpretationIndex : 0..<interpretations.size) { |
183 | if(representation instanceof PartialInterpretation) { | 183 | monitor.subTask('''Solving problem«IF runs>0» «run»/«runs»«ENDIF»: Visualising solution «interpretationIndex»/«interpretations.size»''') |
184 | val vis1 = new PartialInterpretation2Gml | 184 | val interpretation = interpretations.get(interpretationIndex) |
185 | val gml = vis1.transform(representation) | 185 | val model = logic2Ecore.transformInterpretation(interpretation,modelGeneration.trace) |
186 | outputWorkspaceForRun.writeText('''model«IF runs>1»_«run»«ENDIF»_«interpretationIndex».gml''',gml) | 186 | outputWorkspaceForRun.writeModel(model,'''model«IF runs>1»_«run»«ENDIF»_«interpretationIndex+1».xmi''') |
187 | if(representation.newElements.size + representation.problem.elements.size < 150) { | 187 | |
188 | val vis2 = new GraphvizVisualisation | 188 | val representation = solution.representation.get(interpretationIndex) |
189 | val dot = vis2.visualiseConcretization(representation) | 189 | if(representation instanceof PartialInterpretation) { |
190 | dot.writeToFile(outputWorkspaceForRun,'''model«IF runs>1»_«run»«ENDIF»_«interpretationIndex»''') | 190 | val vis1 = new PartialInterpretation2Gml |
191 | val gml = vis1.transform(representation) | ||
192 | outputWorkspaceForRun.writeText('''model«IF runs>1»_«run»«ENDIF»_«interpretationIndex+1».gml''',gml) | ||
193 | if(representation.newElements.size + representation.problem.elements.size < 150) { | ||
194 | val vis2 = new GraphvizVisualisation | ||
195 | val dot = vis2.visualiseConcretization(representation) | ||
196 | dot.writeToFile(outputWorkspaceForRun,'''model«IF runs>1»_«run»«ENDIF»_«interpretationIndex+1»''') | ||
197 | } | ||
191 | } | 198 | } |
199 | monitor.worked(100) | ||
192 | } | 200 | } |
201 | } else { | ||
202 | monitor.worked(solverConfig.solutionScope.numberOfRequiredSolution*100) | ||
193 | } | 203 | } |
194 | 204 | ||
195 | for(representation : solution.representation) { | ||
196 | |||
197 | } | ||
198 | } | 205 | } |
199 | 206 | console.writeMessage("Model generation finished") | |
207 | } catch(Exception e) { | ||
208 | console.writeError('''Error occured: «e.message»''') | ||
200 | } | 209 | } |
201 | console.writeMessage("Model generation finished") | ||
202 | } | 210 | } |
203 | 211 | ||
204 | private def dispatch soutionDescription(InconsistencyResult s) { | 212 | private def dispatch soutionDescription(InconsistencyResult s) { |
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/NullWorkspace.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/NullWorkspace.xtend index fa677a7c..05081581 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/NullWorkspace.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/NullWorkspace.xtend | |||
@@ -24,6 +24,9 @@ class NullWorkspace extends ReasonerWorkspace{ | |||
24 | override URI getWorkspaceURI() { | 24 | override URI getWorkspaceURI() { |
25 | throw new UnsupportedOperationException(message) | 25 | throw new UnsupportedOperationException(message) |
26 | } | 26 | } |
27 | |||
28 | override init() { } | ||
29 | override clear() { } | ||
27 | override public void initAndClear() {} | 30 | override public void initAndClear() {} |
28 | override protected URI getURI(String name) { | 31 | override protected URI getURI(String name) { |
29 | throw new UnsupportedOperationException(message) | 32 | throw new UnsupportedOperationException(message) |
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 37e64d98..d8a37184 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 | |||
@@ -26,6 +26,9 @@ import java.util.LinkedHashMap | |||
26 | import java.util.Optional | 26 | import java.util.Optional |
27 | import org.eclipse.emf.common.util.URI | 27 | import org.eclipse.emf.common.util.URI |
28 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.DocumentLevelSpecification | 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 | ||
31 | import org.eclipse.core.runtime.Status | ||
29 | 32 | ||
30 | class ScriptExecutor { | 33 | class ScriptExecutor { |
31 | val parser = new ApplicationConfigurationParser | 34 | val parser = new ApplicationConfigurationParser |
@@ -37,15 +40,30 @@ class ScriptExecutor { | |||
37 | * Executes a script | 40 | * Executes a script |
38 | */ | 41 | */ |
39 | public def executeScript(URI uri) { | 42 | public def executeScript(URI uri) { |
40 | val script = parser.parse(uri) | 43 | val job = new Job('''Model Generation: «uri.lastSegment»''') { |
41 | script.executeScript | 44 | override protected run(IProgressMonitor monitor) { |
45 | try{ | ||
46 | monitor.subTask('''Loading script''') | ||
47 | val script = parser.parse(uri) | ||
48 | script.executeScript(monitor) | ||
49 | return Status.OK_STATUS; | ||
50 | } catch(Exception e) { | ||
51 | return Status.OK_STATUS | ||
52 | } | ||
53 | } | ||
54 | } | ||
55 | job.setUser(true); | ||
56 | job.schedule(); | ||
42 | } | 57 | } |
43 | 58 | ||
44 | public def executeScript(ConfigurationScript script) { | 59 | public def executeScript(ConfigurationScript script, IProgressMonitor monitor) { |
45 | script.activateAllEPackageReferences | 60 | script.activateAllEPackageReferences |
46 | val tasks = script.commands.filter(Task) | 61 | val tasks = script.commands.filter(Task) |
47 | for(task : tasks.filterNull) { | 62 | |
48 | task.execute | 63 | for(taskIndex : 0..<tasks.size) { |
64 | val task = tasks.get(taskIndex) | ||
65 | monitor.beginTask('''Executing task«IF tasks.size>1» «taskIndex+1»«ENDIF»: «task.name»''',task.totalWork) | ||
66 | task.execute(monitor) | ||
49 | } | 67 | } |
50 | } | 68 | } |
51 | 69 | ||
@@ -75,12 +93,33 @@ class ScriptExecutor { | |||
75 | // } | 93 | // } |
76 | } | 94 | } |
77 | 95 | ||
78 | def public dispatch execute(GenerationTask task) { | 96 | def public dispatch execute(GenerationTask task, IProgressMonitor monitor) { |
79 | val generationTaskExecutor = new GenerationTaskExecutor | 97 | val generationTaskExecutor = new GenerationTaskExecutor |
80 | generationTaskExecutor.executeGenerationTask(task,this) | 98 | generationTaskExecutor.executeGenerationTask(task,this,monitor) |
99 | } | ||
100 | |||
101 | def public dispatch execute(Task task, IProgressMonitor monitor) { | ||
102 | throw new IllegalArgumentException('''Unsupported task type: «task.class.simpleName»!''') | ||
81 | } | 103 | } |
82 | 104 | ||
83 | def public dispatch execute(Task task) { | 105 | /** |
106 | * Mapping time = 100 | ||
107 | * Solving = 1000 * runs | ||
108 | * Visualisation = runs * number * 100 | ||
109 | */ | ||
110 | def protected dispatch getTotalWork(GenerationTask task) { | ||
111 | val runs = if(task.runSpecified) { task.runs } else { 1 } | ||
112 | val number = if(task.numberSpecified) { task.number } else { 1 } | ||
113 | return 100 + runs*1000 +runs*number*100 | ||
114 | } | ||
115 | def protected dispatch getTotalWork(Task task) { | ||
116 | throw new IllegalArgumentException('''Unsupported task type: «task.class.simpleName»!''') | ||
117 | } | ||
118 | |||
119 | def protected dispatch getName(GenerationTask task) { | ||
120 | '''Model Generation''' | ||
121 | } | ||
122 | def protected dispatch getName(Task task) { | ||
84 | throw new IllegalArgumentException('''Unsupported task type: «task.class.simpleName»!''') | 123 | throw new IllegalArgumentException('''Unsupported task type: «task.class.simpleName»!''') |
85 | } | 124 | } |
86 | 125 | ||