diff options
author | 2018-08-28 15:35:23 +0200 | |
---|---|---|
committer | 2018-08-28 15:35:23 +0200 | |
commit | 28f5f61a51266de5cca55bf676f66ab6782907bd (patch) | |
tree | ef3467afb6e6fdc8ed4d9eb9172fead0bd0b82c0 /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme | |
parent | Merge branch 'master' into hypergraphs (diff) | |
download | VIATRA-Generator-28f5f61a51266de5cca55bf676f66ab6782907bd.tar.gz VIATRA-Generator-28f5f61a51266de5cca55bf676f66ab6782907bd.tar.zst VIATRA-Generator-28f5f61a51266de5cca55bf676f66ab6782907bd.zip |
Fix bug (NullPointerException)
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme')
1 files changed, 2 insertions, 2 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend index e6bc5706..8b5d7f2c 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend | |||
@@ -99,11 +99,11 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresenta | |||
99 | def Map<DefinedElement, List<PatternRelation<DefinedElement>>> createPatternRelations( | 99 | def Map<DefinedElement, List<PatternRelation<DefinedElement>>> createPatternRelations( |
100 | PartialInterpretation model, Set<ViatraQueryMatcher<? extends IPatternMatch>> relevantPatterns) { | 100 | PartialInterpretation model, Set<ViatraQueryMatcher<? extends IPatternMatch>> relevantPatterns) { |
101 | val Map<DefinedElement, List<PatternRelation<DefinedElement>>> result=new HashMap; | 101 | val Map<DefinedElement, List<PatternRelation<DefinedElement>>> result=new HashMap; |
102 | if (relevantPatterns===null) return result; | 102 | |
103 | for (element : model.elements) { | 103 | for (element : model.elements) { |
104 | result.put(element,new LinkedList<PatternRelation<DefinedElement>>) | 104 | result.put(element,new LinkedList<PatternRelation<DefinedElement>>) |
105 | } | 105 | } |
106 | 106 | if (relevantPatterns===null) return result; | |
107 | for (pattern : relevantPatterns) { | 107 | for (pattern : relevantPatterns) { |
108 | val name=pattern.patternName | 108 | val name=pattern.patternName |
109 | val arity=pattern.parameterNames.size | 109 | val arity=pattern.parameterNames.size |