diff options
Diffstat (limited to 'Solvers')
-rw-r--r-- | Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend index cedcec5a..9845560c 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend | |||
@@ -5,6 +5,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | |||
5 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery | 5 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery |
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | 6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality |
7 | import java.util.Map | 7 | import java.util.Map |
8 | import org.eclipse.emf.common.util.Enumerator | ||
8 | import org.eclipse.emf.ecore.EAttribute | 9 | import org.eclipse.emf.ecore.EAttribute |
9 | import org.eclipse.emf.ecore.EEnumLiteral | 10 | import org.eclipse.emf.ecore.EEnumLiteral |
10 | import org.eclipse.emf.ecore.EReference | 11 | import org.eclipse.emf.ecore.EReference |
@@ -17,6 +18,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality | |||
17 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter | 18 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter |
18 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality | 19 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality |
19 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall | 20 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall |
21 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint | ||
20 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.BinaryTransitiveClosure | 22 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.BinaryTransitiveClosure |
21 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue | 23 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue |
22 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall | 24 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall |
@@ -24,7 +26,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeCo | |||
24 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | 26 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery |
25 | 27 | ||
26 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | 28 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* |
27 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint | ||
28 | 29 | ||
29 | class RelationDefinitionIndexer { | 30 | class RelationDefinitionIndexer { |
30 | val PatternGenerator base; | 31 | val PatternGenerator base; |
@@ -228,6 +229,9 @@ class RelationDefinitionIndexer { | |||
228 | if(target instanceof EEnumLiteral) { | 229 | if(target instanceof EEnumLiteral) { |
229 | targetString = '''const_«target.name»_«target.EEnum.name»''' | 230 | targetString = '''const_«target.name»_«target.EEnum.name»''' |
230 | additionalDefinition = '''DefinedElement.name(«targetString»,"«target.name» «target.EEnum.name»"); //LogicProblem.elements(problem,«targetString»);''' | 231 | additionalDefinition = '''DefinedElement.name(«targetString»,"«target.name» «target.EEnum.name»"); //LogicProblem.elements(problem,«targetString»);''' |
232 | } else if(target instanceof Enumerator) { | ||
233 | targetString = '''const_«target.name»_«target.class.simpleName»''' | ||
234 | additionalDefinition = '''DefinedElement.name(«targetString»,"«target.name» «target.class.simpleName»"); //LogicProblem.elements(problem,«targetString»);''' | ||
231 | } else if(target instanceof Integer) { | 235 | } else if(target instanceof Integer) { |
232 | targetString = '''const_«target»_Integer''' | 236 | targetString = '''const_«target»_Integer''' |
233 | additionalDefinition = '''IntegerElement.value(«targetString»,«target»);''' | 237 | additionalDefinition = '''IntegerElement.value(«targetString»,«target»);''' |