From 18767ac9962932a496833c5971d3157e468c172e Mon Sep 17 00:00:00 2001 From: 20001LastOrder Date: Mon, 27 May 2019 16:41:23 -0400 Subject: fix the null pointer error when trying reproducing the generation procedure --- .../dslreasoner/viatrasolver/logic2viatra/ScopePropagator.xtend | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src') diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ScopePropagator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ScopePropagator.xtend index 38633c07..d1b29f01 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ScopePropagator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ScopePropagator.xtend @@ -63,9 +63,12 @@ class ScopePropagator { def public propagateAdditionToType(PartialTypeInterpratation t) { // println('''Adding to «(t as PartialComplexTypeInterpretation).interpretationOf.name»''') val targetScope = type2Scope.get(t) - targetScope.removeOne - val sups = superScopes.get(targetScope) - sups.forEach[removeOne] + if(targetScope != null){ + targetScope.removeOne + val sups = superScopes.get(targetScope) + sups.forEach[removeOne] + } + if(this.partialInterpretation.minNewElements > 0) { this.partialInterpretation.minNewElements = this.partialInterpretation.minNewElements-1 } -- cgit v1.2.3-70-g09d2