aboutsummaryrefslogtreecommitdiffstats
path: root/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend
diff options
context:
space:
mode:
authorLibravatar OszkarSemerath <oszkar.semerath@gmail.com>2018-05-08 17:03:07 +0200
committerLibravatar OszkarSemerath <oszkar.semerath@gmail.com>2018-05-08 17:03:07 +0200
commit4585a4d344da5498200548e7add61e5cccd44924 (patch)
tree3a030bea39db36db43d97b62124f6c2a7db111a7 /Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend
parentUpdated and fixed dependencies: (diff)
downloadVIATRA-Generator-4585a4d344da5498200548e7add61e5cccd44924.tar.gz
VIATRA-Generator-4585a4d344da5498200548e7add61e5cccd44924.tar.zst
VIATRA-Generator-4585a4d344da5498200548e7add61e5cccd44924.zip
Refactored to the milestone version of Viatra 2.0
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend')
-rw-r--r--Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend6
1 files changed, 3 insertions, 3 deletions
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 {
143 { 143 {
144 val pquery = squery.internalQueryRepresentation 144 val pquery = squery.internalQueryRepresentation
145 val disjunction = if(config.normalize) { 145 val disjunction = if(config.normalize) {
146 val normalizer = new PBodyNormalizer(EMFQueryMetaContext.INSTANCE,true) 146 val normalizer = new PBodyNormalizer(EMFQueryMetaContext.DEFAULT)
147 normalizer.rewrite(pquery) 147 normalizer.rewrite(pquery)
148 } else { 148 } else {
149 pquery.disjunctBodies 149 pquery.disjunctBodies
@@ -255,7 +255,7 @@ class Viatra2Logic {
255 def TypeDescriptor getType(PVariable v, PBody body, TracedOutput<LogicProblem, Ecore2Logic_Trace> ecore2LogicTrace) { 255 def TypeDescriptor getType(PVariable v, PBody body, TracedOutput<LogicProblem, Ecore2Logic_Trace> ecore2LogicTrace) {
256 if(v.isPositiveVariable) { 256 if(v.isPositiveVariable) {
257 val allTypes = v.lookup( 257 val allTypes = v.lookup(
258 body.getAllUnaryTypeRestrictions(EMFQueryMetaContext.INSTANCE)) 258 body.getAllUnaryTypeRestrictions(EMFQueryMetaContext.DEFAULT))
259 val types = allTypes.filter[it.inputKey instanceof BaseEMFTypeKey<?>].toSet 259 val types = allTypes.filter[it.inputKey instanceof BaseEMFTypeKey<?>].toSet
260 260
261 if(types.size == 0) { 261 if(types.size == 0) {
@@ -279,7 +279,7 @@ class Viatra2Logic {
279 val indexOfVariable = v.lookup(onlyConstraint.actualParametersTuple.invertIndex) 279 val indexOfVariable = v.lookup(onlyConstraint.actualParametersTuple.invertIndex)
280 val parameter = onlyConstraint.referredQuery.parameters.get(indexOfVariable) 280 val parameter = onlyConstraint.referredQuery.parameters.get(indexOfVariable)
281 val declaredUnaryType = parameter.declaredUnaryType as BaseEMFTypeKey<? extends EClassifier> 281 val declaredUnaryType = parameter.declaredUnaryType as BaseEMFTypeKey<? extends EClassifier>
282 if(declaredUnaryType == null) { 282 if(declaredUnaryType === null) {
283 throw new UnsupportedOperationException( 283 throw new UnsupportedOperationException(
284 '''parameter «parameter.name» in pattern « 284 '''parameter «parameter.name» in pattern «
285 onlyConstraint.referredQuery.fullyQualifiedName» does not have type!''') 285 onlyConstraint.referredQuery.fullyQualifiedName» does not have type!''')