diff options
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution')
3 files changed, 18 insertions, 8 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 c3ba9f81..d718bb91 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 | |||
@@ -1,5 +1,6 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.application.execution | 1 | package hu.bme.mit.inf.dslreasoner.application.execution |
2 | 2 | ||
3 | import com.google.inject.Injector | ||
3 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript | 4 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript |
4 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.GenerationTask | 5 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.GenerationTask |
5 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic | 6 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic |
@@ -24,7 +25,9 @@ import java.util.LinkedList | |||
24 | import java.util.Optional | 25 | import java.util.Optional |
25 | import org.eclipse.core.runtime.IProgressMonitor | 26 | import org.eclipse.core.runtime.IProgressMonitor |
26 | import org.eclipse.emf.common.util.URI | 27 | import org.eclipse.emf.common.util.URI |
28 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor | ||
27 | 29 | ||
30 | @FinalFieldsConstructor | ||
28 | class GenerationTaskExecutor { | 31 | class GenerationTaskExecutor { |
29 | val metamodelLoader = new MetamodelLoader | 32 | val metamodelLoader = new MetamodelLoader |
30 | val modelLoader = new ModelLoader | 33 | val modelLoader = new ModelLoader |
@@ -32,6 +35,7 @@ class GenerationTaskExecutor { | |||
32 | val solverLoader = new SolverLoader | 35 | val solverLoader = new SolverLoader |
33 | val scopeLoader = new ScopeLoader | 36 | val scopeLoader = new ScopeLoader |
34 | val statisticsUtil = new StatisticSections2CSV | 37 | val statisticsUtil = new StatisticSections2CSV |
38 | val Injector injector | ||
35 | 39 | ||
36 | def executeGenerationTask( | 40 | def executeGenerationTask( |
37 | GenerationTask task, | 41 | GenerationTask task, |
@@ -102,7 +106,7 @@ class GenerationTaskExecutor { | |||
102 | var domain2LogicTransformationTime = System.nanoTime | 106 | var domain2LogicTransformationTime = System.nanoTime |
103 | val Ecore2Logic ecore2Logic = new Ecore2Logic | 107 | val Ecore2Logic ecore2Logic = new Ecore2Logic |
104 | val Logic2Ecore logic2Ecore = new Logic2Ecore(ecore2Logic) | 108 | val Logic2Ecore logic2Ecore = new Logic2Ecore(ecore2Logic) |
105 | val Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic) | 109 | val Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic, injector) |
106 | val InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic | 110 | val InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic |
107 | 111 | ||
108 | var modelGeneration = ecore2Logic.transformMetamodel(metamodelDescriptor,new Ecore2LogicConfiguration()) | 112 | var modelGeneration = ecore2Logic.transformMetamodel(metamodelDescriptor,new Ecore2LogicConfiguration()) |
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/PatternLanguageWithRSSetup.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/PatternLanguageWithRSSetup.xtend index c209cde5..371f6f8c 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/PatternLanguageWithRSSetup.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/PatternLanguageWithRSSetup.xtend | |||
@@ -1,11 +1,7 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.application.execution | 1 | package hu.bme.mit.inf.dslreasoner.application.execution |
2 | 2 | ||
3 | import org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguageStandaloneSetupGenerated | ||
4 | import com.google.inject.Injector | ||
5 | import com.google.inject.Guice | 3 | import com.google.inject.Guice |
6 | import org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguageRuntimeModule | 4 | import com.google.inject.Injector |
7 | import com.google.inject.Guice; | ||
8 | import com.google.inject.Injector; | ||
9 | import org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguageStandaloneSetup | 5 | import org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguageStandaloneSetup |
10 | 6 | ||
11 | class PatternLanguageWithRSSetup extends EMFPatternLanguageStandaloneSetup{ | 7 | class PatternLanguageWithRSSetup extends EMFPatternLanguageStandaloneSetup{ |
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 3dea677f..9d0985d2 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 | |||
@@ -1,5 +1,7 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.application.execution | 1 | package hu.bme.mit.inf.dslreasoner.application.execution |
2 | 2 | ||
3 | import com.google.inject.Inject | ||
4 | import com.google.inject.Injector | ||
3 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigReference | 5 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigReference |
4 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigSpecification | 6 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigSpecification |
5 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript | 7 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript |
@@ -33,11 +35,19 @@ import org.eclipse.core.runtime.jobs.Job | |||
33 | import org.eclipse.emf.common.util.URI | 35 | import org.eclipse.emf.common.util.URI |
34 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor | 36 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor |
35 | 37 | ||
36 | @FinalFieldsConstructor | ||
37 | class ScriptExecutor { | 38 | class ScriptExecutor { |
38 | val parser = new ApplicationConfigurationParser | 39 | val parser = new ApplicationConfigurationParser |
39 | 40 | ||
40 | val ScriptConsole.Factory scriptConsoleFactory | 41 | val ScriptConsole.Factory scriptConsoleFactory |
42 | val Injector injector | ||
43 | |||
44 | @FinalFieldsConstructor | ||
45 | new() { | ||
46 | } | ||
47 | |||
48 | new(ScriptConsole.Factory scriptConsoleFactory) { | ||
49 | this(scriptConsoleFactory, null) | ||
50 | } | ||
41 | 51 | ||
42 | /** | 52 | /** |
43 | * Executes a script | 53 | * Executes a script |
@@ -101,7 +111,7 @@ class ScriptExecutor { | |||
101 | } | 111 | } |
102 | 112 | ||
103 | def dispatch void execute(GenerationTask task, IProgressMonitor monitor) { | 113 | def dispatch void execute(GenerationTask task, IProgressMonitor monitor) { |
104 | val generationTaskExecutor = new GenerationTaskExecutor | 114 | val generationTaskExecutor = new GenerationTaskExecutor(injector) |
105 | generationTaskExecutor.executeGenerationTask(task,this,scriptConsoleFactory,monitor) | 115 | generationTaskExecutor.executeGenerationTask(task,this,scriptConsoleFactory,monitor) |
106 | } | 116 | } |
107 | 117 | ||