diff options
author | 2018-08-10 21:28:26 +0200 | |
---|---|---|
committer | 2018-08-10 21:28:26 +0200 | |
commit | 049256ab3001e4cd78d484211b9b53419c64256f (patch) | |
tree | 6d10abba65e05f1dbc20406fa05b10115dc88188 /Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScopeLoader.xtend | |
parent | Updated type provider to support java native types (diff) | |
download | VIATRA-Generator-049256ab3001e4cd78d484211b9b53419c64256f.tar.gz VIATRA-Generator-049256ab3001e4cd78d484211b9b53419c64256f.tar.zst VIATRA-Generator-049256ab3001e4cd78d484211b9b53419c64256f.zip |
Application puts hyperlinks of the generated files to the console
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScopeLoader.xtend')
-rw-r--r-- | Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScopeLoader.xtend | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScopeLoader.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScopeLoader.xtend index 9b2b4a3e..4f1a8f38 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScopeLoader.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScopeLoader.xtend | |||
@@ -15,16 +15,15 @@ import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic | |||
15 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace | 15 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace |
16 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes | 16 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes |
17 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | 17 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement |
18 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntLiteral | ||
19 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealLiteral | ||
20 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringLiteral | ||
18 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | 21 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type |
19 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | 22 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition |
20 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | 23 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem |
21 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion | 24 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion |
22 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink | 25 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink |
23 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.IntegerElement | ||
24 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLink | 26 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLink |
25 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PrimitiveElement | ||
26 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RealElement | ||
27 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.StringElement | ||
28 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink | 27 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink |
29 | import java.math.BigDecimal | 28 | import java.math.BigDecimal |
30 | import java.util.HashMap | 29 | import java.util.HashMap |
@@ -36,9 +35,6 @@ import org.eclipse.emf.ecore.EClass | |||
36 | import org.eclipse.xtend.lib.annotations.Data | 35 | import org.eclipse.xtend.lib.annotations.Data |
37 | 36 | ||
38 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | 37 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* |
39 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntLiteral | ||
40 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealLiteral | ||
41 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringLiteral | ||
42 | 38 | ||
43 | @Data class KnownElements { | 39 | @Data class KnownElements { |
44 | val Map<Type,Set<DefinedElement>> knownElementsByType | 40 | val Map<Type,Set<DefinedElement>> knownElementsByType |
@@ -93,6 +89,10 @@ class ScopeLoader { | |||
93 | 89 | ||
94 | aggregated.minNewElements = updateLowerLimit(scope.isSetsNew,numberOfKnownElements,aggregated.minNewElements,getLowerLimit(scope.number)) | 90 | aggregated.minNewElements = updateLowerLimit(scope.isSetsNew,numberOfKnownElements,aggregated.minNewElements,getLowerLimit(scope.number)) |
95 | aggregated.maxNewElements = updateUpperLimit(scope.isSetsNew,numberOfKnownElements,aggregated.maxNewElements,getUpperLimit(scope.number)) | 91 | aggregated.maxNewElements = updateUpperLimit(scope.isSetsNew,numberOfKnownElements,aggregated.maxNewElements,getUpperLimit(scope.number)) |
92 | |||
93 | if(aggregated.maxNewElements < 0) { | ||
94 | inconsistencies+='''Inconsistent scope: problem already contains «numberOfKnownElements» elements, but scope sets the upper limit to «getUpperLimit(scope.number)»!''' | ||
95 | } | ||
96 | } | 96 | } |
97 | def dispatch setSpecification(ClassTypeScope scope, TypeScopes aggregated, Map<Type, Set<DefinedElement>> knownElements, Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace, List<String> inconsistencies) { | 97 | def dispatch setSpecification(ClassTypeScope scope, TypeScopes aggregated, Map<Type, Set<DefinedElement>> knownElements, Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace, List<String> inconsistencies) { |
98 | val target = scope.type.element | 98 | val target = scope.type.element |
@@ -161,7 +161,7 @@ class ScopeLoader { | |||
161 | val notDefinedInScope = known.filter[!definedInScope.contains(it)] | 161 | val notDefinedInScope = known.filter[!definedInScope.contains(it)] |
162 | inconsistencies += '''Inconsistent scope: problem already contains literal«IF notDefinedInScope.size > 0»s«ENDIF» that excluded by a scope: «FOR e: notDefinedInScope SEPARATOR ", "»«e»«ENDFOR».''' | 162 | inconsistencies += '''Inconsistent scope: problem already contains literal«IF notDefinedInScope.size > 0»s«ENDIF» that excluded by a scope: «FOR e: notDefinedInScope SEPARATOR ", "»«e»«ENDFOR».''' |
163 | } | 163 | } |
164 | known.clear | 164 | //known.clear |
165 | known += definedInScope | 165 | known += definedInScope |
166 | } | 166 | } |
167 | } | 167 | } |