diff options
author | 2018-09-14 16:38:04 +0200 | |
---|---|---|
committer | 2018-09-14 16:38:04 +0200 | |
commit | 28bd83cecdd9510a46aa443d6d4c5fe09e6eda93 (patch) | |
tree | 3f490ce59b7ac63f7aa094dba00c302656c0019c /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend | |
parent | updated support for java types (diff) | |
download | VIATRA-Generator-28bd83cecdd9510a46aa443d6d4c5fe09e6eda93.tar.gz VIATRA-Generator-28bd83cecdd9510a46aa443d6d4c5fe09e6eda93.tar.zst VIATRA-Generator-28bd83cecdd9510a46aa443d6d4c5fe09e6eda93.zip |
Update support for java and emf DATATYPES, and basic scope propagator
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend')
-rw-r--r-- | Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend index d11b5960..d6a15c1a 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend | |||
@@ -155,6 +155,11 @@ class GenericTypeIndexer extends TypeIndexer { | |||
155 | find supertypeStar(type,definedSupertype); | 155 | find supertypeStar(type,definedSupertype); |
156 | TypeDefinition(definedSupertype); | 156 | TypeDefinition(definedSupertype); |
157 | } | 157 | } |
158 | |||
159 | private pattern scopeDisallowsNewElementsFromType(typeInterpretation:PartialComplexTypeInterpretation) { | ||
160 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
161 | Scope.maxNewElements(scope,0); | ||
162 | } | ||
158 | ''' | 163 | ''' |
159 | 164 | ||
160 | public override generateInstanceOfQueries(LogicProblem problem, PartialInterpretation emptySolution,TypeAnalysisResult typeAnalysisResult) { | 165 | public override generateInstanceOfQueries(LogicProblem problem, PartialInterpretation emptySolution,TypeAnalysisResult typeAnalysisResult) { |
@@ -190,6 +195,7 @@ class GenericTypeIndexer extends TypeIndexer { | |||
190 | Type.name(type,"«type.name»"); | 195 | Type.name(type,"«type.name»"); |
191 | find possibleDynamicType(problem,interpretation,dynamic,element); | 196 | find possibleDynamicType(problem,interpretation,dynamic,element); |
192 | find supertypeStar(dynamic,type); | 197 | find supertypeStar(dynamic,type); |
198 | neg find scopeDisallowsNewElementsFromType(dynamic); | ||
193 | } | 199 | } |
194 | ''' | 200 | ''' |
195 | } | 201 | } |