diff options
author | 2017-08-16 18:53:14 +0200 | |
---|---|---|
committer | 2017-08-16 18:53:14 +0200 | |
commit | 220c94d5e4f79f0699f51ef78c1c72022121e344 (patch) | |
tree | ea06d4b57d5faf63d8fa1a8f7ff08a65df3dcb91 /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra | |
parent | runners with new type scopes (diff) | |
download | VIATRA-Generator-220c94d5e4f79f0699f51ef78c1c72022121e344.tar.gz VIATRA-Generator-220c94d5e4f79f0699f51ef78c1c72022121e344.tar.zst VIATRA-Generator-220c94d5e4f79f0699f51ef78c1c72022121e344.zip |
Bugfixing typo in generated queries
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra')
2 files changed, 29 insertions, 29 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend index 6e1e5765..1ef82195 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend | |||
@@ -1,31 +1,31 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | 1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns |
2 | 2 | ||
3 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.InverseRelationAssertion | ||
4 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.LowerMultiplicityAssertion | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolTypeReference | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntTypeReference | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealTypeReference | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | 9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration |
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition | 10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition |
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringTypeReference | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeReference | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
14 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.DefinedByDerivedFeature | ||
15 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery | ||
16 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransformedViatraWellformednessConstraint | ||
17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult | ||
19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeInferenceMethod | ||
20 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
21 | import java.util.HashMap | ||
5 | import java.util.Map | 22 | import java.util.Map |
23 | import org.eclipse.emf.ecore.EAttribute | ||
6 | import org.eclipse.emf.ecore.EReference | 24 | import org.eclipse.emf.ecore.EReference |
7 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | 25 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery |
8 | import org.eclipse.xtend.lib.annotations.Accessors | 26 | import org.eclipse.xtend.lib.annotations.Accessors |
9 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery | 27 | |
10 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | 28 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* |
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
12 | import org.eclipse.emf.ecore.EAttribute | ||
13 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeInferenceMethod | ||
16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult | ||
17 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.LowerMultiplicityAssertion | ||
18 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransformedViatraWellformednessConstraint | ||
19 | import java.util.HashMap | ||
20 | import java.util.HashSet | ||
21 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.InverseRelationAssertion | ||
22 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
23 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.DefinedByDerivedFeature | ||
24 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeReference | ||
25 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolTypeReference | ||
26 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntTypeReference | ||
27 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealTypeReference | ||
28 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringTypeReference | ||
29 | 29 | ||
30 | class PatternGenerator { | 30 | class PatternGenerator { |
31 | @Accessors(PUBLIC_GETTER) val TypeIndexer typeIndexer //= new TypeIndexer(this) | 31 | @Accessors(PUBLIC_GETTER) val TypeIndexer typeIndexer //= new TypeIndexer(this) |
@@ -183,7 +183,7 @@ class PatternGenerator { | |||
183 | } or { | 183 | } or { |
184 | find interpretation(problem,interpetation); | 184 | find interpretation(problem,interpetation); |
185 | PartialInterpretation.realelements(interpetation,element); | 185 | PartialInterpretation.realelements(interpetation,element); |
186 | } | 186 | } or { |
187 | find interpretation(problem,interpetation); | 187 | find interpretation(problem,interpetation); |
188 | PartialInterpretation.stringelements(interpetation,element); | 188 | PartialInterpretation.stringelements(interpetation,element); |
189 | } | 189 | } |
@@ -197,15 +197,15 @@ class PatternGenerator { | |||
197 | } or { | 197 | } or { |
198 | find interpretation(problem,interpetation); | 198 | find interpretation(problem,interpetation); |
199 | neg find integerCloseWorld(interpetation); | 199 | neg find integerCloseWorld(interpetation); |
200 | PartialInterpretation.newIntegers(interpetation,element) | 200 | PartialInterpretation.newIntegers(interpetation,element); |
201 | } or { | 201 | } or { |
202 | find interpretation(problem,interpetation); | 202 | find interpretation(problem,interpetation); |
203 | neg find realCloseWorld(interpetation); | 203 | neg find realCloseWorld(interpetation); |
204 | PartialInterpretation.newReals(interpetation,element) | 204 | PartialInterpretation.newReals(interpetation,element); |
205 | } or { | 205 | } or { |
206 | find interpretation(problem,interpetation); | 206 | find interpretation(problem,interpetation); |
207 | neg find stringCloseWorld(interpetation); | 207 | neg find stringCloseWorld(interpetation); |
208 | PartialInterpretation.newStrings(interpetation,element) | 208 | PartialInterpretation.newStrings(interpetation,element); |
209 | } | 209 | } |
210 | 210 | ||
211 | private pattern elementCloseWorld(interpetation:PartialInterpretation) { | 211 | private pattern elementCloseWorld(interpetation:PartialInterpretation) { |
@@ -242,25 +242,25 @@ class PatternGenerator { | |||
242 | ////////// | 242 | ////////// |
243 | // 1.1.1 primitive Type Indexers | 243 | // 1.1.1 primitive Type Indexers |
244 | ////////// | 244 | ////////// |
245 | pattern instaneofBoolean(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | 245 | pattern instanceofBoolean(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { |
246 | find interpretation(problem,interpretation); | 246 | find interpretation(problem,interpretation); |
247 | PartialInterpretation.booleanelements(interpretation,element); | 247 | PartialInterpretation.booleanelements(interpretation,element); |
248 | } | 248 | } |
249 | pattern instaneofInteger(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | 249 | pattern instanceofInteger(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { |
250 | find interpretation(problem,interpretation); | 250 | find interpretation(problem,interpretation); |
251 | PartialInterpretation.integerelements(interpretation,element); | 251 | PartialInterpretation.integerelements(interpretation,element); |
252 | } or { | 252 | } or { |
253 | find interpretation(problem,interpretation); | 253 | find interpretation(problem,interpretation); |
254 | PartialInterpretation.newIntegers(interpetation,element); | 254 | PartialInterpretation.newIntegers(interpetation,element); |
255 | } | 255 | } |
256 | pattern instaneofReal(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | 256 | pattern instanceofReal(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { |
257 | find interpretation(problem,interpretation); | 257 | find interpretation(problem,interpretation); |
258 | PartialInterpretation.realements(interpretation,element); | 258 | PartialInterpretation.realelements(interpretation,element); |
259 | } or { | 259 | } or { |
260 | find interpretation(problem,interpretation); | 260 | find interpretation(problem,interpretation); |
261 | PartialInterpretation.newReals(interpetation,element); | 261 | PartialInterpretation.newReals(interpetation,element); |
262 | } | 262 | } |
263 | pattern instaneofString(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | 263 | pattern instanceofString(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { |
264 | find interpretation(problem,interpretation); | 264 | find interpretation(problem,interpretation); |
265 | PartialInterpretation.stringelements(interpretation,element); | 265 | PartialInterpretation.stringelements(interpretation,element); |
266 | } or { | 266 | } or { |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexerWithPreliminaryTypeAnalysis.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexerWithPreliminaryTypeAnalysis.xtend index 73e43d52..fd0b7c18 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexerWithPreliminaryTypeAnalysis.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexerWithPreliminaryTypeAnalysis.xtend | |||
@@ -81,7 +81,7 @@ class TypeIndexerWithPreliminaryTypeAnalysis extends TypeIndexer{ | |||
81 | «ENDFOR» | 81 | «ENDFOR» |
82 | } or { | 82 | } or { |
83 | find interpretation(problem,interpretation); | 83 | find interpretation(problem,interpretation); |
84 | PartialInterpretation.openWorldElementPrototype(interpetation,element); | 84 | PartialInterpretation.openWorldElementPrototypes(interpetation,element); |
85 | } or | 85 | } or |
86 | «ENDIF» | 86 | «ENDIF» |
87 | { «referInstanceOf(type,Modality.MUST,"element")» } | 87 | { «referInstanceOf(type,Modality.MUST,"element")» } |