diff options
author | 2020-04-15 01:45:13 +0200 | |
---|---|---|
committer | 2020-04-15 01:45:13 +0200 | |
commit | d25afa235db5ba183229d55da3eb4cf78647553f (patch) | |
tree | 2fe504e021caa126f9f9639d61992b2d5f776172 | |
parent | memory management support for v8 javascript engine added (visualization) (diff) | |
download | VIATRA-Generator-d25afa235db5ba183229d55da3eb4cf78647553f.tar.gz VIATRA-Generator-d25afa235db5ba183229d55da3eb4cf78647553f.tar.zst VIATRA-Generator-d25afa235db5ba183229d55da3eb4cf78647553f.zip |
(lipstick)
5 files changed, 9 insertions, 5 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 c9d38c7d..790ef76b 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 | |||
@@ -132,9 +132,8 @@ class GenerationTaskExecutor { | |||
132 | // 5. create a solver and a configuration | 132 | // 5. create a solver and a configuration |
133 | // 5.1 initialize | 133 | // 5.1 initialize |
134 | val solver = solverLoader.loadSolver(task.solver,configurationMap) | 134 | val solver = solverLoader.loadSolver(task.solver,configurationMap) |
135 | val solverConfig = solverLoader.loadSolverConfig(task.solver,configurationMap,console) | ||
136 | |||
137 | 135 | ||
136 | val solverConfig = solverLoader.loadSolverConfig(task.solver,configurationMap,console) | ||
138 | // 5.2 set values that defined directly | 137 | // 5.2 set values that defined directly |
139 | solverConfig.solutionScope = new SolutionScope => [ | 138 | solverConfig.solutionScope = new SolutionScope => [ |
140 | it.numberOfRequiredSolution = if(task.numberSpecified) { | 139 | it.numberOfRequiredSolution = if(task.numberSpecified) { |
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 a9573fbf..3f0ba03f 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 | |||
@@ -14,6 +14,7 @@ import java.util.Optional | |||
14 | import org.eclipse.xtext.xbase.lib.Functions.Function1 | 14 | import org.eclipse.xtext.xbase.lib.Functions.Function1 |
15 | import hu.bme.mit.inf.dslreasoner.visualisation.pi2graphviz.GraphvizVisualiser | 15 | import hu.bme.mit.inf.dslreasoner.visualisation.pi2graphviz.GraphvizVisualiser |
16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.DiversityDescriptor | 16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.DiversityDescriptor |
17 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder.SolverConfiguration | ||
17 | 18 | ||
18 | class SolverLoader { | 19 | class SolverLoader { |
19 | def loadSolver(Solver solver, Map<String, String> config) { | 20 | def loadSolver(Solver solver, Map<String, String> config) { |
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/validation/QueryAndMetamodelValidator.java b/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/validation/QueryAndMetamodelValidator.java index 3ed13964..567551f1 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/validation/QueryAndMetamodelValidator.java +++ b/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/validation/QueryAndMetamodelValidator.java | |||
@@ -79,7 +79,7 @@ public class QueryAndMetamodelValidator { | |||
79 | } | 79 | } |
80 | } | 80 | } |
81 | }; | 81 | }; |
82 | return Iterables.<ENamedElement>filter(Iterables.<ENamedElement>concat(ListExtensions.<EReference, Iterable<ENamedElement>>map(references, _function_1)), ENamedElement.class); | 82 | return Iterables.<ENamedElement>filter((Iterables.<ENamedElement>concat(ListExtensions.<EReference, Iterable<ENamedElement>>map(references, _function_1))), ENamedElement.class); |
83 | }; | 83 | }; |
84 | return Iterables.<ENamedElement>concat(ListExtensions.<EObject, Iterable<ENamedElement>>map(elements, _function)); | 84 | return Iterables.<ENamedElement>concat(ListExtensions.<EObject, Iterable<ENamedElement>>map(elements, _function)); |
85 | } | 85 | } |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend index f7a1ce4f..d37acb6d 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend | |||
@@ -42,6 +42,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntLiteral | |||
42 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealLiteral | 42 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealLiteral |
43 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringLiteral | 43 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringLiteral |
44 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation | 44 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation |
45 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition | ||
45 | 46 | ||
46 | @Data class Problem2PartialInterpretationTrace { | 47 | @Data class Problem2PartialInterpretationTrace { |
47 | Map<TypeDeclaration, PartialComplexTypeInterpretation> type2Interpretation | 48 | Map<TypeDeclaration, PartialComplexTypeInterpretation> type2Interpretation |
@@ -233,7 +234,11 @@ class PartialInterpretationInitialiser { | |||
233 | 234 | ||
234 | def private Map<RelationDeclaration, PartialRelationInterpretation> initRelations(PartialInterpretation interpretation, PrimitiveValueTrace trace) { | 235 | def private Map<RelationDeclaration, PartialRelationInterpretation> initRelations(PartialInterpretation interpretation, PrimitiveValueTrace trace) { |
235 | val Map<RelationDeclaration, PartialRelationInterpretation> relation2Interpretation = new HashMap | 236 | val Map<RelationDeclaration, PartialRelationInterpretation> relation2Interpretation = new HashMap |
236 | for(relation : interpretation.problem.relations.filter(RelationDeclaration)) { | 237 | val definedRelationDeclarations = interpretation.problem.relations.filter(RelationDefinition).map[defines] |
238 | val undefinedRelationDeclarations = interpretation.problem.relations.filter(RelationDeclaration).filter[ | ||
239 | declared | !definedRelationDeclarations.exists[defined | defined === declared] | ||
240 | ] | ||
241 | for(relation : undefinedRelationDeclarations) { | ||
237 | val partialInterpretation = relation.initialisePartialRelationInterpretation | 242 | val partialInterpretation = relation.initialisePartialRelationInterpretation |
238 | interpretation.partialrelationinterpretation += partialInterpretation | 243 | interpretation.partialrelationinterpretation += partialInterpretation |
239 | relation2Interpretation.put(relation,partialInterpretation) | 244 | relation2Interpretation.put(relation,partialInterpretation) |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend index 6639e5f3..bdc48b8d 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend | |||
@@ -59,7 +59,6 @@ class ViatraReasoner extends LogicReasoner{ | |||
59 | val transformationStartTime = System.nanoTime | 59 | val transformationStartTime = System.nanoTime |
60 | 60 | ||
61 | 61 | ||
62 | |||
63 | val emptySolution = initialiser.initialisePartialInterpretation(problem,viatraConfig.typeScopes).output | 62 | val emptySolution = initialiser.initialisePartialInterpretation(problem,viatraConfig.typeScopes).output |
64 | if((viatraConfig.documentationLevel == DocumentationLevel::FULL || viatraConfig.documentationLevel == DocumentationLevel::NORMAL) && workspace !== null) { | 63 | if((viatraConfig.documentationLevel == DocumentationLevel::FULL || viatraConfig.documentationLevel == DocumentationLevel::NORMAL) && workspace !== null) { |
65 | workspace.writeModel(emptySolution,"init.partialmodel") | 64 | workspace.writeModel(emptySolution,"init.partialmodel") |