diff options
Diffstat (limited to 'subprojects/language-semantics/src/main')
-rw-r--r-- | subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/ModelInitializer.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/ModelInitializer.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/ModelInitializer.java index c2bca2a5..203baad6 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/ModelInitializer.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/ModelInitializer.java | |||
@@ -29,7 +29,10 @@ import tools.refinery.store.reasoning.seed.ModelSeed; | |||
29 | import tools.refinery.store.reasoning.seed.Seed; | 29 | import tools.refinery.store.reasoning.seed.Seed; |
30 | import tools.refinery.store.reasoning.translator.TranslationException; | 30 | import tools.refinery.store.reasoning.translator.TranslationException; |
31 | import tools.refinery.store.reasoning.translator.containment.ContainmentHierarchyTranslator; | 31 | import tools.refinery.store.reasoning.translator.containment.ContainmentHierarchyTranslator; |
32 | import tools.refinery.store.reasoning.translator.metamodel.*; | 32 | import tools.refinery.store.reasoning.translator.metamodel.Metamodel; |
33 | import tools.refinery.store.reasoning.translator.metamodel.MetamodelBuilder; | ||
34 | import tools.refinery.store.reasoning.translator.metamodel.MetamodelTranslator; | ||
35 | import tools.refinery.store.reasoning.translator.metamodel.ReferenceInfo; | ||
33 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; | 36 | import tools.refinery.store.reasoning.translator.multiobject.MultiObjectTranslator; |
34 | import tools.refinery.store.reasoning.translator.multiplicity.ConstrainedMultiplicity; | 37 | import tools.refinery.store.reasoning.translator.multiplicity.ConstrainedMultiplicity; |
35 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; | 38 | import tools.refinery.store.reasoning.translator.multiplicity.Multiplicity; |
@@ -243,15 +246,14 @@ public class ModelInitializer { | |||
243 | 246 | ||
244 | private void collectClassDeclarationSymbols(ClassDeclaration classDeclaration) { | 247 | private void collectClassDeclarationSymbols(ClassDeclaration classDeclaration) { |
245 | collectPartialRelation(classDeclaration, 1, null, TruthValue.UNKNOWN); | 248 | collectPartialRelation(classDeclaration, 1, null, TruthValue.UNKNOWN); |
246 | for (var featureDeclaration : classDeclaration.getFeatureDeclarations()) { | 249 | for (var referenceDeclaration : classDeclaration.getFeatureDeclarations()) { |
247 | if (featureDeclaration instanceof ReferenceDeclaration referenceDeclaration) { | 250 | if (referenceDeclaration.getReferenceType() instanceof DatatypeDeclaration) { |
248 | collectPartialRelation(referenceDeclaration, 2, null, TruthValue.UNKNOWN); | 251 | throw new TracedException(referenceDeclaration, "Attributes are not yet supported"); |
249 | var invalidMultiplicityConstraint = referenceDeclaration.getInvalidMultiplicity(); | 252 | } |
250 | if (invalidMultiplicityConstraint != null) { | 253 | collectPartialRelation(referenceDeclaration, 2, null, TruthValue.UNKNOWN); |
251 | collectPartialRelation(invalidMultiplicityConstraint, 1, TruthValue.FALSE, TruthValue.FALSE); | 254 | var invalidMultiplicityConstraint = referenceDeclaration.getInvalidMultiplicity(); |
252 | } | 255 | if (invalidMultiplicityConstraint != null) { |
253 | } else { | 256 | collectPartialRelation(invalidMultiplicityConstraint, 1, TruthValue.FALSE, TruthValue.FALSE); |
254 | throw new TracedException(featureDeclaration, "Unknown feature declaration"); | ||
255 | } | 257 | } |
256 | } | 258 | } |
257 | } | 259 | } |
@@ -319,10 +321,8 @@ public class ModelInitializer { | |||
319 | } catch (RuntimeException e) { | 321 | } catch (RuntimeException e) { |
320 | throw TracedException.addTrace(classDeclaration, e); | 322 | throw TracedException.addTrace(classDeclaration, e); |
321 | } | 323 | } |
322 | for (var featureDeclaration : classDeclaration.getFeatureDeclarations()) { | 324 | for (var referenceDeclaration : classDeclaration.getFeatureDeclarations()) { |
323 | if (featureDeclaration instanceof ReferenceDeclaration referenceDeclaration) { | 325 | collectReferenceDeclarationMetamodel(classDeclaration, referenceDeclaration); |
324 | collectReferenceDeclarationMetamodel(classDeclaration, referenceDeclaration); | ||
325 | } | ||
326 | } | 326 | } |
327 | } | 327 | } |
328 | 328 | ||