From 4585a4d344da5498200548e7add61e5cccd44924 Mon Sep 17 00:00:00 2001 From: OszkarSemerath Date: Tue, 8 May 2018 17:03:07 +0200 Subject: Refactored to the milestone version of Viatra 2.0 --- .../src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src') diff --git a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend index 42c93da1..8d234fe9 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend +++ b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend @@ -143,7 +143,7 @@ class Viatra2Logic { { val pquery = squery.internalQueryRepresentation val disjunction = if(config.normalize) { - val normalizer = new PBodyNormalizer(EMFQueryMetaContext.INSTANCE,true) + val normalizer = new PBodyNormalizer(EMFQueryMetaContext.DEFAULT) normalizer.rewrite(pquery) } else { pquery.disjunctBodies @@ -255,7 +255,7 @@ class Viatra2Logic { def TypeDescriptor getType(PVariable v, PBody body, TracedOutput ecore2LogicTrace) { if(v.isPositiveVariable) { val allTypes = v.lookup( - body.getAllUnaryTypeRestrictions(EMFQueryMetaContext.INSTANCE)) + body.getAllUnaryTypeRestrictions(EMFQueryMetaContext.DEFAULT)) val types = allTypes.filter[it.inputKey instanceof BaseEMFTypeKey].toSet if(types.size == 0) { @@ -279,7 +279,7 @@ class Viatra2Logic { val indexOfVariable = v.lookup(onlyConstraint.actualParametersTuple.invertIndex) val parameter = onlyConstraint.referredQuery.parameters.get(indexOfVariable) val declaredUnaryType = parameter.declaredUnaryType as BaseEMFTypeKey - if(declaredUnaryType == null) { + if(declaredUnaryType === null) { throw new UnsupportedOperationException( '''parameter «parameter.name» in pattern « onlyConstraint.referredQuery.fullyQualifiedName» does not have type!''') -- cgit v1.2.3-54-g00ecf