diff options
author | 2020-04-15 01:45:13 +0200 | |
---|---|---|
committer | 2020-04-15 01:45:13 +0200 | |
commit | d25afa235db5ba183229d55da3eb4cf78647553f (patch) | |
tree | 2fe504e021caa126f9f9639d61992b2d5f776172 /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner | |
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)
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner')
1 files changed, 6 insertions, 1 deletions
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) |