diff options
author | 2019-08-01 18:38:43 +0200 | |
---|---|---|
committer | 2019-08-01 18:38:43 +0200 | |
commit | 30617bc0afc7eb9ce0e7f703e8b4296749d2c3aa (patch) | |
tree | 07ed93bbfe1fa62e6ba5b34961499f55e93bae09 /Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/RunMeasurements.xtend | |
parent | Clean up CPS and Satellite domains (diff) | |
download | VIATRA-Generator-30617bc0afc7eb9ce0e7f703e8b4296749d2c3aa.tar.gz VIATRA-Generator-30617bc0afc7eb9ce0e7f703e8b4296749d2c3aa.tar.zst VIATRA-Generator-30617bc0afc7eb9ce0e7f703e8b4296749d2c3aa.zip |
Ensure that experiment runner code compiles
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/RunMeasurements.xtend')
-rw-r--r-- | Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/RunMeasurements.xtend | 17 |
1 files changed, 7 insertions, 10 deletions
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 8d96958d..ae810a9b 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 | |||
@@ -25,10 +25,12 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeInferenceMethod | |||
25 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic | 25 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic |
26 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | 26 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation |
27 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage | 27 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage |
28 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml | ||
28 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.DiversityDescriptor | 29 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.DiversityDescriptor |
29 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.StateCoderStrategy | 30 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.StateCoderStrategy |
30 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner | 31 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner |
31 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration | 32 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration |
33 | import hu.bme.mit.inf.dslreasoner.visualisation.pi2graphviz.GraphvizVisualiser | ||
32 | import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace | 34 | import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace |
33 | import java.io.BufferedReader | 35 | import java.io.BufferedReader |
34 | import java.io.InputStreamReader | 36 | import java.io.InputStreamReader |
@@ -37,9 +39,6 @@ import org.eclipse.emf.ecore.EObject | |||
37 | import org.eclipse.emf.ecore.resource.Resource | 39 | import org.eclipse.emf.ecore.resource.Resource |
38 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl | 40 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl |
39 | import org.junit.Test | 41 | import org.junit.Test |
40 | import hu.bme.mit.inf.dslreasoner.visualisation.pi2graphviz.GraphvizVisualisation | ||
41 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretationSizePrinter | ||
42 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml | ||
43 | 42 | ||
44 | enum UseSolver{Viatra, Smt, ViatraWithSmt, Alloy} | 43 | enum UseSolver{Viatra, Smt, ViatraWithSmt, Alloy} |
45 | enum Domain{FAM, Yakindu, FileSystem,Ecore} | 44 | enum Domain{FAM, Yakindu, FileSystem,Ecore} |
@@ -129,7 +128,7 @@ class RunMeasurements { | |||
129 | val smtConfig = new SmtSolverConfiguration() => [ | 128 | val smtConfig = new SmtSolverConfiguration() => [ |
130 | it.typeScopes.maxNewElements = size | 129 | it.typeScopes.maxNewElements = size |
131 | it.typeScopes.minNewElements = size | 130 | it.typeScopes.minNewElements = size |
132 | it.solutionScope.numberOfRequiredSolution = number | 131 | it.solutionScope.numberOfRequiredSolutions = number |
133 | it.solverPath = '''"D:/Programs/Z3/4.3/z3.exe"''' | 132 | it.solverPath = '''"D:/Programs/Z3/4.3/z3.exe"''' |
134 | ] | 133 | ] |
135 | val solution = this.smtSolver.solve( | 134 | val solution = this.smtSolver.solve( |
@@ -142,9 +141,8 @@ class RunMeasurements { | |||
142 | val alloyConfig = new AlloySolverConfiguration => [ | 141 | val alloyConfig = new AlloySolverConfiguration => [ |
143 | it.typeScopes.maxNewElements = size | 142 | it.typeScopes.maxNewElements = size |
144 | it.typeScopes.minNewElements = size | 143 | it.typeScopes.minNewElements = size |
145 | it.solutionScope.numberOfRequiredSolution = number | 144 | it.solutionScope.numberOfRequiredSolutions = number |
146 | it.typeScopes.maxNewIntegers = 0 | 145 | it.typeScopes.maxNewIntegers = 0 |
147 | it.writeToFile = true | ||
148 | ] | 146 | ] |
149 | val solution = this.alloyReasoner.solve( | 147 | val solution = this.alloyReasoner.solve( |
150 | problem, | 148 | problem, |
@@ -157,13 +155,12 @@ class RunMeasurements { | |||
157 | it.runtimeLimit = 400 | 155 | it.runtimeLimit = 400 |
158 | it.typeScopes.maxNewElements = size | 156 | it.typeScopes.maxNewElements = size |
159 | it.typeScopes.minNewElements = size | 157 | it.typeScopes.minNewElements = size |
160 | it.solutionScope.numberOfRequiredSolution = number | 158 | it.solutionScope.numberOfRequiredSolutions = number |
161 | it.existingQueries = vq.patterns.map[it.internalQueryRepresentation] | ||
162 | it.nameNewElements = false | 159 | it.nameNewElements = false |
163 | it.typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis | 160 | it.typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis |
164 | it.searchSpaceConstraints.additionalGlobalConstraints += loader.additionalConstraints | 161 | it.searchSpaceConstraints.additionalGlobalConstraints += loader.additionalConstraints |
165 | it.stateCoderStrategy = StateCoderStrategy::Neighbourhood | 162 | it.stateCoderStrategy = StateCoderStrategy::Neighbourhood |
166 | it.debugCongiguration.partalInterpretationVisualisationFrequency = 100 | 163 | it.debugConfiguration.partalInterpretationVisualisationFrequency = 100 |
167 | //it.debugCongiguration.partialInterpretatioVisualiser = | 164 | //it.debugCongiguration.partialInterpretatioVisualiser = |
168 | //new GraphvizVisualisation | 165 | //new GraphvizVisualisation |
169 | //new PartialInterpretationSizePrinter | 166 | //new PartialInterpretationSizePrinter |
@@ -267,7 +264,7 @@ class RunMeasurements { | |||
267 | val gml = partialInterpretation2GML.transform(representation) | 264 | val gml = partialInterpretation2GML.transform(representation) |
268 | r.workspace.writeText('''solution«representationNumber».gml''',gml) | 265 | r.workspace.writeText('''solution«representationNumber».gml''',gml) |
269 | if(representation.newElements.size <160) { | 266 | if(representation.newElements.size <160) { |
270 | val visualiser = new GraphvizVisualisation | 267 | val visualiser = new GraphvizVisualiser |
271 | val visualisation = visualiser.visualiseConcretization(representation) | 268 | val visualisation = visualiser.visualiseConcretization(representation) |
272 | visualisation.writeToFile(r.workspace,'''solution«representationNumber»''') | 269 | visualisation.writeToFile(r.workspace,'''solution«representationNumber»''') |
273 | } | 270 | } |