diff options
author | 2017-07-12 15:42:41 +0200 | |
---|---|---|
committer | 2017-07-12 15:42:41 +0200 | |
commit | ba4e9ca3d2e9916e6802ee4e629d6ad4cdcd4127 (patch) | |
tree | eb53d9244c72bb1bbf858bd7730f7687e67a1e51 /Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run | |
parent | added /xtend-gen/ to excluded folders. (diff) | |
download | VIATRA-Generator-ba4e9ca3d2e9916e6802ee4e629d6ad4cdcd4127.tar.gz VIATRA-Generator-ba4e9ca3d2e9916e6802ee4e629d6ad4cdcd4127.tar.zst VIATRA-Generator-ba4e9ca3d2e9916e6802ee4e629d6ad4cdcd4127.zip |
Corrected the configuration in the test runners.
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run')
3 files changed, 19 insertions, 11 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/DiverseMeasurementRunner.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/DiverseMeasurementRunner.xtend index e6ee0ad9..c3f77ad7 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/DiverseMeasurementRunner.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/DiverseMeasurementRunner.xtend | |||
@@ -35,6 +35,8 @@ import org.eclipse.xtend.lib.annotations.Data | |||
35 | import java.util.LinkedList | 35 | import java.util.LinkedList |
36 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.AlloySolver | 36 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.AlloySolver |
37 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.AlloySolverConfiguration | 37 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.AlloySolverConfiguration |
38 | import hu.bme.mit.inf.dslreasoner.visualisation.pi2graphviz.GraphvisVisualisation | ||
39 | import hu.bme.mit.inf.dslreasoner.visualisation.pi2graphviz.GraphvizVisualisation | ||
38 | 40 | ||
39 | enum Metamodel { | 41 | enum Metamodel { |
40 | FAM, YakinduWOSynch, Yakindu | 42 | FAM, YakinduWOSynch, Yakindu |
@@ -190,7 +192,9 @@ class ScenarioRunner { | |||
190 | it.existingQueries = vq.patterns.map[it.internalQueryRepresentation] | 192 | it.existingQueries = vq.patterns.map[it.internalQueryRepresentation] |
191 | it.nameNewElements = false | 193 | it.nameNewElements = false |
192 | it.typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis | 194 | it.typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis |
193 | it.additionalGlobalConstraints += loader.additionalConstraints | 195 | it.searchSpaceConstraints.additionalGlobalConstraints += loader.additionalConstraints |
196 | it.debugCongiguration.partalInterpretationVisualisationFrequency = 1 | ||
197 | it.debugCongiguration.partialInterpretatioVisualiser = new GraphvizVisualisation | ||
194 | it.stateCoderStrategy = if(scenario.statecoder == StateCoder::ID) { | 198 | it.stateCoderStrategy = if(scenario.statecoder == StateCoder::ID) { |
195 | StateCoderStrategy::IDBased | 199 | StateCoderStrategy::IDBased |
196 | } else { | 200 | } else { |
@@ -309,7 +313,7 @@ class ScenarioRunner { | |||
309 | 313 | ||
310 | class DiverseMeasurementRunner { | 314 | class DiverseMeasurementRunner { |
311 | def static void main(String[] args) { | 315 | def static void main(String[] args) { |
312 | val scenario = new Scenario(100,49,Metamodel::Yakindu,Constraints.All,StateCoder.Normal,1,Solver::Alloy) | 316 | val scenario = new Scenario(30,49,Metamodel::Yakindu,Constraints.All,StateCoder.Normal,1,Solver::ViatraSolver) |
313 | val scenarioRunner = new ScenarioRunner | 317 | val scenarioRunner = new ScenarioRunner |
314 | scenarioRunner.runScenario(scenario) | 318 | scenarioRunner.runScenario(scenario) |
315 | } | 319 | } |
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/RunMeasurements.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/RunMeasurements.xtend index b4ae9293..8de44b5b 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/RunMeasurements.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/RunMeasurements.xtend | |||
@@ -63,7 +63,7 @@ class RunMeasurements { | |||
63 | // Solvers | 63 | // Solvers |
64 | val SMTSolver smtSolver = new SMTSolver | 64 | val SMTSolver smtSolver = new SMTSolver |
65 | val ViatraReasoner viatraSolver = new ViatraReasoner | 65 | val ViatraReasoner viatraSolver = new ViatraReasoner |
66 | val ViatraReasoner viatraWithSmtSolver = new ViatraReasoner(smtSolver) | 66 | val ViatraReasoner viatraWithSmtSolver = new ViatraReasoner |
67 | val AlloySolver alloyReasoner = new AlloySolver | 67 | val AlloySolver alloyReasoner = new AlloySolver |
68 | 68 | ||
69 | def dslLoader(Domain dsl) { | 69 | def dslLoader(Domain dsl) { |
@@ -154,7 +154,7 @@ class RunMeasurements { | |||
154 | it.existingQueries = vq.patterns.map[it.internalQueryRepresentation] | 154 | it.existingQueries = vq.patterns.map[it.internalQueryRepresentation] |
155 | it.nameNewElements = false | 155 | it.nameNewElements = false |
156 | it.typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis | 156 | it.typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis |
157 | it.additionalGlobalConstraints += loader.additionalConstraints | 157 | it.searchSpaceConstraints.additionalGlobalConstraints += loader.additionalConstraints |
158 | it.stateCoderStrategy = StateCoderStrategy::Neighbourhood | 158 | it.stateCoderStrategy = StateCoderStrategy::Neighbourhood |
159 | ] | 159 | ] |
160 | viatraConfig.diversityRequirement = diversityRequirement | 160 | viatraConfig.diversityRequirement = diversityRequirement |
@@ -172,7 +172,10 @@ class RunMeasurements { | |||
172 | ] | 172 | ] |
173 | val solution = this.viatraWithSmtSolver.solve( | 173 | val solution = this.viatraWithSmtSolver.solve( |
174 | problem, | 174 | problem, |
175 | viatraConfig =>[it.inconsistencDetectorConfiguration = inconsistency], | 175 | viatraConfig =>[ |
176 | it.internalConsistencyCheckerConfiguration.internalIncosnsitencyDetector = smtSolver | ||
177 | it.internalConsistencyCheckerConfiguration.internalInconsistencDetectorConfiguration = inconsistency | ||
178 | ], | ||
176 | this.workspace | 179 | this.workspace |
177 | ) | 180 | ) |
178 | return solution | 181 | return solution |
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend index 20683fff..0a304915 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend | |||
@@ -33,6 +33,7 @@ import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.AlloySolver | |||
33 | import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore | 33 | import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore |
34 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner | 34 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner |
35 | import java.util.LinkedList | 35 | import java.util.LinkedList |
36 | import hu.bme.mit.inf.dslreasoner.visualisation.pi2graphviz.GraphvizVisualisation | ||
36 | 37 | ||
37 | class SimpleRun { | 38 | class SimpleRun { |
38 | 39 | ||
@@ -63,16 +64,16 @@ class SimpleRun { | |||
63 | println("Problem created") | 64 | println("Problem created") |
64 | var LogicResult solution | 65 | var LogicResult solution |
65 | var LogicReasoner reasoner | 66 | var LogicReasoner reasoner |
66 | /* | 67 | //* |
67 | reasoner = new ViatraReasoner | 68 | reasoner = new ViatraReasoner |
68 | val viatraConfig = new ViatraReasonerConfiguration => [ | 69 | val viatraConfig = new ViatraReasonerConfiguration => [ |
69 | it.typeScopes.maxNewElements = 10 | 70 | it.typeScopes.maxNewElements = 40 |
70 | it.typeScopes.minNewElements = 10 | 71 | it.typeScopes.minNewElements = 40 |
71 | it.solutionScope.numberOfRequiredSolution = 1 | 72 | it.solutionScope.numberOfRequiredSolution = 1 |
72 | it.existingQueries = queries.patterns.map[it.internalQueryRepresentation] | 73 | it.existingQueries = queries.patterns.map[it.internalQueryRepresentation] |
73 | it.nameNewElements = true | 74 | it.debugCongiguration.logging = true |
74 | it.typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis | 75 | it.debugCongiguration.partalInterpretationVisualisationFrequency = 1 |
75 | it.stateCoderStrategy = StateCoderStrategy::Neighbourhood | 76 | it.debugCongiguration.partialInterpretatioVisualiser = new GraphvizVisualisation |
76 | ] | 77 | ] |
77 | solution = reasoner.solve(logicProblem,viatraConfig,workspace) | 78 | solution = reasoner.solve(logicProblem,viatraConfig,workspace) |
78 | /*/ | 79 | /*/ |