diff --git a/.editorconfig b/.editorconfig index 15b0f6bec..91f133f5c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -112,14 +112,15 @@ csharp_style_throw_expression = true:suggestion csharp_style_conditional_delegate_call = true:suggestion csharp_style_prefer_static_local_function = true:suggestion csharp_style_expression_bodied_methods = false:none -csharp_style_expression_bodied_properties = false:none -csharp_style_expression_bodied_indexers = false:none -csharp_style_expression_bodied_accessors = false:none +csharp_style_expression_bodied_properties = true:suggestion +csharp_style_expression_bodied_indexers = true:suggestion +csharp_style_expression_bodied_accessors = true:suggestion csharp_style_expression_bodied_operators = false:none csharp_style_expression_bodied_lambdas = when_on_single_line:suggestion csharp_style_expression_bodied_local_functions = false:none csharp_style_expression_bodied_constructors = false:none csharp_style_prefer_primary_constructors = false:none +resharper_accessor_owner_body = expression_body #### 8. XML documentation formatting — Rider: XmlDocFormatter resharper_xmldoc_indent_size = 1 diff --git a/Resources/KerML_only_xmi.uml b/Resources/KerML_only_xmi.uml index 49bd7aa35..2e4443e59 100644 --- a/Resources/KerML_only_xmi.uml +++ b/Resources/KerML_only_xmi.uml @@ -1,5 +1,5 @@ - + The Root layer provides the syntactic foundation for KerML. @@ -1824,12 +1824,14 @@ endif - <p>The <code>featureMemberships</code> of a <code>Type</code> is the union of the <code>ownedFeatureMemberships</code> and those <code>inheritedMemberships</code> that are <code>FeatureMemberships</code>.</p> + <p>The <code>featureMemberships</code> of a <code>Type</code> is the union of the <code>ownedFeatureMemberships</code> and those <code>inheritedMemberships</code> that are <code>FeatureMemberships</code> owned by a direct or indirect supertype of this <code>Type</code>.</p> OCL2.0 - featureMembership = ownedFeatureMembership->union( - inheritedMembership->selectByKind(FeatureMembership)) + featureMembership = ownedFeatureMembership-> + union(inheritedMembership-> + selectByKind(FeatureMembership)-> + select(mem | self.specializes(mem.owningType))) @@ -3012,11 +3014,15 @@ featuringTypes->forAll(t | - <p>If the redefinedFeature of a Redefinition has isEnd = true, then the redefiningFeature must have isEnd = true.</p> + <p>If the <code>redefinedFeature</code> of a <code>Redefinition</code> has <code>isEnd = true</code> and the <code>owningType</code> of the <code>redefiningFeature</code> is an <code>Association</code> or <code>Connector</code>, then the <code>redefiningFeature</code> must have <code>isEnd = true</code>.</p> OCL2.0 - redefinedFeature.isEnd implies redefiningFeature.isEnd + redefinedFeature.isEnd and +redefiningFeature.owningType <> null and +(redefiningFeature.owningType.oclIsKindOf(Association) or + redefiningFeature.owningType.oclIsKindOf(Connector)) implies + redefiningFeature.isEnd @@ -4115,7 +4121,7 @@ owningNamespace.oclAsType(Feature).ownedCrossFeature() = self - <p>If this <code>Feature</code> is an end <code>Feature</code> of its <code>owningType</code>, then return the first <code>ownedMember</code> of the <code>Feature</code> that is a <code>Feature</code>, but not a <code>Multiplicity</code> or a <code>MetadataFeature</code>, and whose <code>owningMembership</code> is <em>not</em> a <code>FeatureMembership</code>. If this exists, it is the <code>crossFeature</code> of the end <code>Feature</code>.</p> + <p>If this <code>Feature</code> is an end <code>Feature</code> of its <code>owningType</code>, then return the first <code>ownedMember</code> of the <code>Feature</code> that is a <code>Feature</code>, but <em>not</em> a <code>Multiplicity</code>, <code>MetadataFeature</code>, or <code>BindingConnector</code>, and whose <code>owningMembership</code> is <em>not</em> a <code>FeatureMembership</code> or <code>FeatureValue</code>. If this exists, it is the <code>crossFeature</code> of the end <code>Feature</code>.</p> @@ -4124,13 +4130,16 @@ owningNamespace.oclAsType(Feature).ownedCrossFeature() = self else let ownedMemberFeatures: Sequence(Feature) = ownedMember->selectByKind(Feature)-> - reject(oclIsKindOf(Multiplicity) or + reject(oclIsKindOf(Multiplicity) or oclIsKindOf(MetadataFeature) or - oclIsKindOf(FeatureValue))-> - reject(owningMembership.oclIsKindOf(FeatureMembership)) in + oclIsKindOf(BindingConnector))-> + reject(owningMembership.oclIsKindOf(FeatureMembership) or + owningMembership.oclIsKindOf(FeatureValue)) in if ownedMemberFeatures.isEmpty() then null else ownedMemberFeatures->first() - endif + endif +endif + @@ -5919,12 +5928,12 @@ endif - <p>The <code>result</code> of an <code>IndexExpression</code> must specialize the <code>result</code> parameter of the first <code>argument</code> of the <code>IndexExpression</code>, unless that <code>result</code> already directly or indirectly specializes the <code>DataType</code> <em><code>Collections::Array</code></em> from the Kernel Data Type Library.</p> + <p>The <code>result</code> of an <code>IndexExpression</code> must specialize the <code>result</code> parameter of the first <code>argument</code> of the <code>IndexExpression</code>, unless that <code>result</code> already directly or indirectly specializes the <code>DataType</code> <em><code>Collections::Collection</code></em> from the Kernel Data Type Library.</p> OCL2.0 arguments->notEmpty() and -not arguments->first().result.specializesFromLibrary('Collections::Array') implies +not arguments->first().result.specializesFromLibrary('Collections::Collection') implies result.specializes(arguments->first().result) @@ -6629,11 +6638,19 @@ endif - <p>The <code>bounds</code> of a <code>MultiplicityRange</code> must have the same <code>featuringTypes</code> as the <code>MultiplicityRange</code>.</p> + <p>If the <code>owningNamespace</code> of a <code>MultiplicityRange</code> is a <code>Feature</code>, but not an owned cross <code>Feature</code>, then the <code>bounds</code> of the <code>MultiplicityRange</code> must have the same <code>featuringTypes</code> as the <code>MultiplicityRange</code>. If the <code>owningNamespace</code> is an owned cross <code>Feature</code>, then the <code>bounds</code> must have the same <code>featuringTypes</code> as the owning end <code>Feature</code> of the <code>owningNamespace</code>. (This allows a cross multiplicity to be evaluated in the same context as the multiplicity of the end <code>Feature</code>.)</p> OCL2.0 - bound->forAll(b | b.featuringType = self.featuringType) + let boundsFeaturingType : OrderedSet(Type) = + if owningNamespace <> null and owningNamespace.oclIsKindOf(Feature) and + owningNamespace.oclAsType(Feature).isOwnedCrossFeature() then + owningNamespace.oclAsType(Feature).owningNamespace.oclAsType(Feature).featuringType + else + featuringType + endif in +bound->forAll(b | b.featuringType = boundsFeaturingType) + diff --git a/Resources/SysML-textual-bnf.kebnf b/Resources/SysML-textual-bnf.kebnf index d997e23aa..a0ba1edef 100644 --- a/Resources/SysML-textual-bnf.kebnf +++ b/Resources/SysML-textual-bnf.kebnf @@ -285,11 +285,13 @@ RefPrefix : Usage = BasicUsagePrefix : Usage = RefPrefix ( isReference ?= 'ref' )? + +// (See Note 1) EndUsagePrefix : Usage = isEnd ?= 'end' ( ownedRelationship += OwnedCrossFeatureMember )? -// (See Note 1) +// (See Note 2) OwnedCrossFeatureMember : OwningMembership = ownedRelatedElement += OwnedCrossFeature @@ -329,7 +331,17 @@ FeatureValue = ownedRelatedElement += OwnedExpression // Notes: -// 1. A Usage parsed with isEnd = true for which mayTimeVary = true must also have isConstant set to true, even though this is not explicitly notated in the textual notation, in order to satisfy the KerML constraint checkFeatureEndIsConstant. +// 1. The Boolean property Usage::isReference has a value derived as the logical negation of Feature::isComposite (see constraint deriveUsageIsReference in 8.3.6.4). In general, unless otherwise stated in the following, if the declaration of any kind of Usage does not include the keyword ref, the Usage shall be parsed with isReference = false and isComposite = true. Conversely, the Usage shall be parsed with isReference = true and isComposite = false in any of the following cases: +// • The declaration includes the keyword ref, explicitly constraining isReference to be true, which shall be considered to require isComposite be set to false. (This includes the case of a ReferenceUsage; see 8.3.6.3.) +// • It is an AttributeUsage (see 8.3.7.3). (Note that an EnumerationUsage is a kind of AttributeUsage; see 8.3.8.3) +// • It is a PortUsage not owned by a PortDefinition or PortUsage (see 8.3.12.6). +// • It would otherwise not satisfy one or more of the abstract syntax validation constraints validateUsageIsReferential (see 8.3.6.8), validateAttributeDefinitionFeature (see 8.3.7.2), and/or validateAttributeUsageFeature (see 8.3.7.3); that is, when any of the following are true: +// • direction is non-null. +// • isEnd is true. +// • owningType is null (so featuringTypes is empty). +// • owningType is an AttributeDefinition. +// • owningType is an AttributeUsage. +// 2. A Usage parsed with isEnd = true for which mayTimeVary = true must also have isConstant set to true, even though this is not explicitly notated in the textual notation, in order to satisfy the KerML constraint checkFeatureEndIsConstant. // Clause 8.2.2.6.3 Reference Usages diff --git a/Resources/SysML_only_xmi.uml b/Resources/SysML_only_xmi.uml index 2764d000c..5f5d91774 100644 --- a/Resources/SysML_only_xmi.uml +++ b/Resources/SysML_only_xmi.uml @@ -1,5 +1,5 @@ - + @@ -398,7 +398,7 @@ endif - <p>An <code>AcceptUsageAction</code> must have at least on input <code>parameter</code>, corresponding to its <em><code>payload</code></em> (even if it has no <code>FeatureValue</code>). (Note that the <code>payloadParameter</code> is an input as well as an output.)</p> + <p>An <code>AcceptUsageAction</code> must have at least one input <code>parameter</code>, corresponding to its <em><code>payload</code></em> (even if it has no <code>FeatureValue</code>). (Note that the <code>payloadParameter</code> is an input as well as an output.)</p> OCL2.0 @@ -586,7 +586,7 @@ owningType.oclAsType(TransitionUsage).triggerAction->includes(self) OCL2.0 isSubactionUsage() implies - specializesFromLibrary('Actions::Action::acceptSubactions') + specializesFromLibrary('Actions::Action::sendSubactions') @@ -2708,7 +2708,7 @@ targetParameter.ownedFeature->first().ownedFeature->first().redefines(referent)< OCL2.0 - nestedMetadata = nestedUsage->selectByKind(MetadataUsage) + nestedMetadata = ownedMember->selectByKind(MetadataUsage) @@ -5560,13 +5560,14 @@ endif - <p>A composite <code>RequirementUsage</code> whose <code>owningType</code> is a <code>RequirementDefinition</code> or <code>RequirementUsage</code> must directly or indirectly specialize the <code>RequirementUsage</code> <em><code>Requirements::RequirementCheck::subrequirements</code></em> from the Systems Model Library.</p> + <p>A composite <code>RequirementUsage</code> whose <code>owningType</code> is a <code>RequirementDefinition</code> or <code>RequirementUsage</code> but is <em>not</em> owned via a <code>RequirementConstraintMembership</code> must directly or indirectly specialize the <code>RequirementUsage</code> <em><code>Requirements::RequirementCheck::subrequirements</code></em> from the Systems Model Library.</p> OCL2.0 isComposite and owningType <> null and (owningType.oclIsKindOf(RequirementDefinition) or - owningType.oclIsKindOf(RequirementUsage)) implies + owningType.oclIsKindOf(RequirementUsage)) and + not owningFeatureMembership.oclIsKindOf(RequirementConstraintMembership) implies specializesFromLibrary('Requirements::RequirementCheck::subrequirements') @@ -7482,6 +7483,28 @@ owningFeatureMembership.oclIsKindOf(ViewRenderingMembership) implies + + + <p>The naming <code>Feature</code> of a <code>RenderingUsage</code> that is owned via a <code>ViewRenderingMembership</code> and has an <code>ownedReferenceSubsetting</code> is the <code>featureTarget</code> of the <code>referencedFeature</code> of that <code>ownedReferenceSubsetting</code>.</p> + + + + OCL2.0 + if owningFeatureMembership <> null and + owningFeatureMembership.oclIsKindOf(ViewRenderingMembership) and + ownedReferenceSubsetting <> null then + ownedReferenceSubsetting.referencedFeature.featureTarget +else + self.oclAsType(OccurrenceUsage).namingFeature() +endif + + + + + + + + diff --git a/Resources/sysml.library.kpar/Kernel_Data_Type_Library-1.0.0.kpar b/Resources/sysml.library.kpar/Kernel_Data_Type_Library-1.0.0.kpar deleted file mode 100644 index c944f3ae1..000000000 Binary files a/Resources/sysml.library.kpar/Kernel_Data_Type_Library-1.0.0.kpar and /dev/null differ diff --git a/Resources/sysml.library.kpar/Kernel_Data_Type_Library-1.1.0-dev.20260801.kpar b/Resources/sysml.library.kpar/Kernel_Data_Type_Library-1.1.0-dev.20260801.kpar new file mode 100644 index 000000000..c3ef5af04 Binary files /dev/null and b/Resources/sysml.library.kpar/Kernel_Data_Type_Library-1.1.0-dev.20260801.kpar differ diff --git a/Resources/sysml.library.kpar/Kernel_Function_Library-1.0.0.kpar b/Resources/sysml.library.kpar/Kernel_Function_Library-1.0.0.kpar deleted file mode 100644 index beaf224a0..000000000 Binary files a/Resources/sysml.library.kpar/Kernel_Function_Library-1.0.0.kpar and /dev/null differ diff --git a/Resources/sysml.library.kpar/Kernel_Function_Library-1.1.0-dev.20260801.kpar b/Resources/sysml.library.kpar/Kernel_Function_Library-1.1.0-dev.20260801.kpar new file mode 100644 index 000000000..7903c0ef8 Binary files /dev/null and b/Resources/sysml.library.kpar/Kernel_Function_Library-1.1.0-dev.20260801.kpar differ diff --git a/Resources/sysml.library.kpar/Kernel_Semantic_Library-1.0.0.kpar b/Resources/sysml.library.kpar/Kernel_Semantic_Library-1.0.0.kpar deleted file mode 100644 index ef6c79c6c..000000000 Binary files a/Resources/sysml.library.kpar/Kernel_Semantic_Library-1.0.0.kpar and /dev/null differ diff --git a/Resources/sysml.library.kpar/Kernel_Semantic_Library-1.1.0-dev.20260801.kpar b/Resources/sysml.library.kpar/Kernel_Semantic_Library-1.1.0-dev.20260801.kpar new file mode 100644 index 000000000..6dab74ae4 Binary files /dev/null and b/Resources/sysml.library.kpar/Kernel_Semantic_Library-1.1.0-dev.20260801.kpar differ diff --git a/Resources/sysml.library.kpar/SysML_Analysis_Library-2.0.0.kpar b/Resources/sysml.library.kpar/SysML_Analysis_Library-2.0.0.kpar deleted file mode 100644 index fcdf17b76..000000000 Binary files a/Resources/sysml.library.kpar/SysML_Analysis_Library-2.0.0.kpar and /dev/null differ diff --git a/Resources/sysml.library.kpar/SysML_Analysis_Library-2.1.0-dev.20260801.kpar b/Resources/sysml.library.kpar/SysML_Analysis_Library-2.1.0-dev.20260801.kpar new file mode 100644 index 000000000..54ddff896 Binary files /dev/null and b/Resources/sysml.library.kpar/SysML_Analysis_Library-2.1.0-dev.20260801.kpar differ diff --git a/Resources/sysml.library.kpar/SysML_Cause_and_Effect_Library-2.0.0.kpar b/Resources/sysml.library.kpar/SysML_Cause_and_Effect_Library-2.0.0.kpar deleted file mode 100644 index 75da9ef1d..000000000 Binary files a/Resources/sysml.library.kpar/SysML_Cause_and_Effect_Library-2.0.0.kpar and /dev/null differ diff --git a/Resources/sysml.library.kpar/SysML_Cause_and_Effect_Library-2.1.0-dev.20260801.kpar b/Resources/sysml.library.kpar/SysML_Cause_and_Effect_Library-2.1.0-dev.20260801.kpar new file mode 100644 index 000000000..b74f88555 Binary files /dev/null and b/Resources/sysml.library.kpar/SysML_Cause_and_Effect_Library-2.1.0-dev.20260801.kpar differ diff --git a/Resources/sysml.library.kpar/SysML_Geometry_Library-2.0.0.kpar b/Resources/sysml.library.kpar/SysML_Geometry_Library-2.0.0.kpar deleted file mode 100644 index 1b8438615..000000000 Binary files a/Resources/sysml.library.kpar/SysML_Geometry_Library-2.0.0.kpar and /dev/null differ diff --git a/Resources/sysml.library.kpar/SysML_Geometry_Library-2.1.0-dev.20260801.kpar b/Resources/sysml.library.kpar/SysML_Geometry_Library-2.1.0-dev.20260801.kpar new file mode 100644 index 000000000..ae04f8628 Binary files /dev/null and b/Resources/sysml.library.kpar/SysML_Geometry_Library-2.1.0-dev.20260801.kpar differ diff --git a/Resources/sysml.library.kpar/SysML_Metadata_Library-2.0.0.kpar b/Resources/sysml.library.kpar/SysML_Metadata_Library-2.0.0.kpar deleted file mode 100644 index 31d4667fa..000000000 Binary files a/Resources/sysml.library.kpar/SysML_Metadata_Library-2.0.0.kpar and /dev/null differ diff --git a/Resources/sysml.library.kpar/SysML_Metadata_Library-2.1.0-dev.20260801.kpar b/Resources/sysml.library.kpar/SysML_Metadata_Library-2.1.0-dev.20260801.kpar new file mode 100644 index 000000000..b0bc84b06 Binary files /dev/null and b/Resources/sysml.library.kpar/SysML_Metadata_Library-2.1.0-dev.20260801.kpar differ diff --git a/Resources/sysml.library.kpar/SysML_Quantities_and_Units_Library-2.0.0.kpar b/Resources/sysml.library.kpar/SysML_Quantities_and_Units_Library-2.0.0.kpar deleted file mode 100644 index 17f566bb6..000000000 Binary files a/Resources/sysml.library.kpar/SysML_Quantities_and_Units_Library-2.0.0.kpar and /dev/null differ diff --git a/Resources/sysml.library.kpar/SysML_Quantities_and_Units_Library-2.1.0-dev.20260801.kpar b/Resources/sysml.library.kpar/SysML_Quantities_and_Units_Library-2.1.0-dev.20260801.kpar new file mode 100644 index 000000000..7feaae380 Binary files /dev/null and b/Resources/sysml.library.kpar/SysML_Quantities_and_Units_Library-2.1.0-dev.20260801.kpar differ diff --git a/Resources/sysml.library.kpar/SysML_Requirement_Derivation_Library-2.0.0.kpar b/Resources/sysml.library.kpar/SysML_Requirement_Derivation_Library-2.0.0.kpar deleted file mode 100644 index cd1ba93ba..000000000 Binary files a/Resources/sysml.library.kpar/SysML_Requirement_Derivation_Library-2.0.0.kpar and /dev/null differ diff --git a/Resources/sysml.library.kpar/SysML_Requirement_Derivation_Library-2.1.0-dev.20260801.kpar b/Resources/sysml.library.kpar/SysML_Requirement_Derivation_Library-2.1.0-dev.20260801.kpar new file mode 100644 index 000000000..95defc422 Binary files /dev/null and b/Resources/sysml.library.kpar/SysML_Requirement_Derivation_Library-2.1.0-dev.20260801.kpar differ diff --git a/Resources/sysml.library.kpar/SysML_Systems_Library-2.0.0.kpar b/Resources/sysml.library.kpar/SysML_Systems_Library-2.0.0.kpar deleted file mode 100644 index 5af313598..000000000 Binary files a/Resources/sysml.library.kpar/SysML_Systems_Library-2.0.0.kpar and /dev/null differ diff --git a/Resources/sysml.library.kpar/SysML_Systems_Library-2.1.0-dev.20260801.kpar b/Resources/sysml.library.kpar/SysML_Systems_Library-2.1.0-dev.20260801.kpar new file mode 100644 index 000000000..b1bc00a2c Binary files /dev/null and b/Resources/sysml.library.kpar/SysML_Systems_Library-2.1.0-dev.20260801.kpar differ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Feature.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Feature.cs index e05d9cabd..a24508a21 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Feature.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Feature.cs @@ -1087,8 +1087,9 @@ public Feature() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Flow.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Flow.cs index 42bdf23f0..3fdc6a7fc 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Flow.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Flow.cs @@ -1283,8 +1283,9 @@ List Root.Elements.IRelationship.Target /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IFeature.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IFeature.cs index 15d9089a8..b97d4038a 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IFeature.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IFeature.cs @@ -407,8 +407,9 @@ public partial interface IFeature : IType /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralInteger.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralInteger.cs index 65ea6a5c3..3e8b6a925 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralInteger.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralInteger.cs @@ -1196,8 +1196,9 @@ public LiteralInteger() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralRational.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralRational.cs index a940d80fe..59fcdf353 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralRational.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralRational.cs @@ -1196,8 +1196,9 @@ public LiteralRational() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/MultiplicityRange.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/MultiplicityRange.cs index 6171817cf..44a53a4a2 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/MultiplicityRange.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/MultiplicityRange.cs @@ -1123,8 +1123,9 @@ public MultiplicityRange() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/RequirementUsage.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/RequirementUsage.cs index 191976952..568095df3 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/RequirementUsage.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/RequirementUsage.cs @@ -1682,8 +1682,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/SelectExpression.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/SelectExpression.cs index b65ca89ab..8da4bfb03 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/SelectExpression.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/SelectExpression.cs @@ -1252,8 +1252,9 @@ string IOperatorExpression.Operator /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Usage.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Usage.cs index 0a7a29b23..46a329de9 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Usage.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Usage.cs @@ -1426,8 +1426,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/ImpliedGuardParserTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/ImpliedGuardParserTestFixture.cs index 715eb53f3..9af1b4997 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/ImpliedGuardParserTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/ImpliedGuardParserTestFixture.cs @@ -141,7 +141,7 @@ public void VerifyCoverageOfTheActualConstraintSet() using (Assert.EnterMultipleScope()) { Assert.That(guarded, Has.Count.EqualTo(63), "The number of guarded constraints in the abstract syntax changed."); - Assert.That(translatable, Is.EqualTo(46), "Guard-shape coverage changed; re-check the patterns against the OCL."); + Assert.That(translatable, Is.EqualTo(45), "Guard-shape coverage changed; re-check the patterns against the OCL."); } } diff --git a/SysML2.NET.Kpar.Tests/ArchiveSessionTestFixture.cs b/SysML2.NET.Kpar.Tests/ArchiveSessionTestFixture.cs index 47819947d..8ae89a1fc 100644 --- a/SysML2.NET.Kpar.Tests/ArchiveSessionTestFixture.cs +++ b/SysML2.NET.Kpar.Tests/ArchiveSessionTestFixture.cs @@ -36,7 +36,7 @@ public class ArchiveSessionTestFixture private static string GetKparPath() { - return Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData", "Kernel_Semantic_Library-1.0.0.kpar"); + return Directory.GetFiles(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData"), "Kernel_Semantic_Library-*.kpar")[0]; } [SetUp] diff --git a/SysML2.NET.Kpar.Tests/Cryptography/ChecksumServiceTestFixture.cs b/SysML2.NET.Kpar.Tests/Cryptography/ChecksumServiceTestFixture.cs index 79e802307..21af3d31a 100644 --- a/SysML2.NET.Kpar.Tests/Cryptography/ChecksumServiceTestFixture.cs +++ b/SysML2.NET.Kpar.Tests/Cryptography/ChecksumServiceTestFixture.cs @@ -48,7 +48,7 @@ public class ChecksumServiceTestFixture private static string GetKparPath() { - return Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData", "Kernel_Semantic_Library-1.0.0.kpar"); + return Directory.GetFiles(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData"), "Kernel_Semantic_Library-*.kpar")[0]; } [OneTimeSetUp] diff --git a/SysML2.NET.Kpar.Tests/ReaderTestFixture.cs b/SysML2.NET.Kpar.Tests/ReaderTestFixture.cs index e740fbd33..1389fe4b1 100644 --- a/SysML2.NET.Kpar.Tests/ReaderTestFixture.cs +++ b/SysML2.NET.Kpar.Tests/ReaderTestFixture.cs @@ -46,7 +46,7 @@ public class ReaderTestFixture private static string GetKparPath() { - return Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData", "Kernel_Semantic_Library-1.0.0.kpar"); + return Directory.GetFiles(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData"), "Kernel_Semantic_Library-*.kpar")[0]; } [OneTimeSetUp] @@ -157,12 +157,12 @@ public void Verify_that_kpar_can_be_opened_from_path_and_model_streams_can_be_op Assert.That(modelStream, Is.Not.Null); Assert.That(modelStream.CanRead, Is.True); - Assert.That(modelStream.Length, Is.GreaterThan(0)); - using var reader = new StreamReader(modelStream, Encoding.UTF8, detectEncodingFromByteOrderMarks: true); var content = reader.ReadToEnd(); + Assert.That(content, Is.Not.Null.And.Not.Empty); + TestContext.WriteLine("---- Base.kerml content ----"); TestContext.WriteLine(content); TestContext.WriteLine("---- End of content ----"); @@ -180,12 +180,13 @@ public async Task Verify_that_kpar_can_be_opened_async_from_path_and_model_strea await using var modelStream = archiveSession.OpenModel("Base"); Assert.That(modelStream, Is.Not.Null); Assert.That(modelStream.CanRead, Is.True); - Assert.That(modelStream.Length, Is.GreaterThan(0)); - + using var reader = new StreamReader(modelStream, Encoding.UTF8, detectEncodingFromByteOrderMarks: true); var content = await reader.ReadToEndAsync(); + Assert.That(content, Is.Not.Null.And.Not.Empty); + TestContext.WriteLine("---- Base.kerml content ----"); TestContext.WriteLine(content); TestContext.WriteLine("---- End of content ----"); @@ -224,7 +225,7 @@ public async Task Verify_that_kpar_can_be_opened_async_from_stream_and_source_is await using var modelStream = archiveSession.OpenModel("Base"); Assert.That(modelStream.CanRead, Is.True); - Assert.That(modelStream.Length, Is.GreaterThan(0)); + Assert.That(modelStream.ReadByte(), Is.GreaterThanOrEqualTo(0)); } finally { @@ -303,14 +304,14 @@ void AssertChecksum(string path, string expectedValue) { AssertChecksum("Triggers.kerml", "124cad3625935e078d1363e6100ee12537ca9c51445a18108e056db8b4885609"); AssertChecksum("ControlPerformances.kerml", "31385be7dca94bd0538f011d5c8f7925626d54f96970769f0fdb28b2186a9a03"); - AssertChecksum("Transfers.kerml", "fa40b483a7834d89f07aad0f6f57e79244adc2a58b4396c4734bddeb297d7c46"); - AssertChecksum("Objects.kerml", "9057e2781fe8793d5108973c0647318caa26310be6231c6380152a4cbc894c25"); + AssertChecksum("Transfers.kerml", "6697453f40187076ebda9ee475f7f974321eb8b48b93622879fe6560fa14dcf5"); + AssertChecksum("Objects.kerml", "7e6b8a0a8f16a475e6c9290926c85defe9e3e1a1bf70df8ef137f4eec08733e6"); AssertChecksum("Metaobjects.kerml", "983dbd85a4b183d8859326ee512fc59d991fb98a115e009e72fad21d1f9d1685"); AssertChecksum("Performances.kerml", "fd965e184b300737a192530de0c800cdbee236cb6220612f370400da21dfb327"); AssertChecksum("StatePerformances.kerml", "f02fb7e8de58f4304c95c575ee1bcb7d271d621ce8e336ce36ea80a4e956c3da"); AssertChecksum("Base.kerml", "56df84cda67f62c63d4e79e2786fc26046cfa361a958c4fcf0843d32a5707e09"); AssertChecksum("Observation.kerml", "6bc57a73c43af6f61201b6eb659024a9f08f974643eb5a101e068e3637761ee4"); - AssertChecksum("TransitionPerformances.kerml", "1ce78437c817c8359a2cad43e8e72b23dd32b81d2a69dc1126c803fae72aae70"); + AssertChecksum("TransitionPerformances.kerml", "31e01baf2dadd5507a81dff436acf38cbdc66abaffc2828705fe2b67e277126a"); AssertChecksum("FeatureReferencingPerformances.kerml", "b6f9e5349c7c7f393591c0334c3bec86f1766b3e37209819179310c2f8fe1fb7"); AssertChecksum("KerML.kerml", "8fdf4b7416e981c895cd74b75dc14b18091d13cbcaff7cdded6f9c23e2483d58"); AssertChecksum("Occurrences.kerml", "b3a62ce0bc3a4f7e667102b4c2f68a4928ca8efeda425c6a4c8bdeadfbc9bbc1"); @@ -332,7 +333,7 @@ void AssertChecksum(string path, string expectedValue) Assert.That(archive.Project.Name, Is.EqualTo("Kernel Semantic Library")); Assert.That(archive.Project.Description, Is.EqualTo("Standard semantic library for the Kernel Modeling Language (KerML)")); - Assert.That(archive.Project.Version, Is.EqualTo("1.0.0")); + Assert.That(archive.Project.Version, Is.EqualTo("1.1.0-dev.20260801")); Assert.That(archive.Project.Usage, Is.Not.Null); Assert.That(archive.Project.Usage.Count, Is.EqualTo(2)); @@ -340,10 +341,10 @@ void AssertChecksum(string path, string expectedValue) Assert.Multiple(() => { Assert.That(archive.Project.Usage[0].Resource, Is.EqualTo(new Uri("https://www.omg.org/spec/KerML/20250201/Data-Type-Library.kpar"))); - Assert.That(archive.Project.Usage[0].VersionConstraint, Is.EqualTo("1.0.0")); + Assert.That(archive.Project.Usage[0].VersionConstraint, Is.EqualTo("1.1.0-dev.20260801")); Assert.That(archive.Project.Usage[1].Resource, Is.EqualTo(new Uri("https://www.omg.org/spec/KerML/20250201/Function-Library.kpar"))); - Assert.That(archive.Project.Usage[1].VersionConstraint, Is.EqualTo("1.0.0")); + Assert.That(archive.Project.Usage[1].VersionConstraint, Is.EqualTo("1.1.0-dev.20260801")); }); } } diff --git a/SysML2.NET.Kpar.Tests/SysML2.NET.Kpar.Tests.csproj b/SysML2.NET.Kpar.Tests/SysML2.NET.Kpar.Tests.csproj index a05b6c6d8..a6ef2a1e7 100644 --- a/SysML2.NET.Kpar.Tests/SysML2.NET.Kpar.Tests.csproj +++ b/SysML2.NET.Kpar.Tests/SysML2.NET.Kpar.Tests.csproj @@ -22,34 +22,7 @@ - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - + Always diff --git a/SysML2.NET.Semantics.Tests/Extensions/ServiceCollectionExtensionsTestFixture.cs b/SysML2.NET.Semantics.Tests/Extensions/ServiceCollectionExtensionsTestFixture.cs new file mode 100644 index 000000000..81899b2e6 --- /dev/null +++ b/SysML2.NET.Semantics.Tests/Extensions/ServiceCollectionExtensionsTestFixture.cs @@ -0,0 +1,109 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Semantics.Tests.Extensions +{ + using System; + using System.Linq; + + using Microsoft.Extensions.DependencyInjection; + + using NUnit.Framework; + + using SysML2.NET.Core.POCO.Kernel.Packages; + using SysML2.NET.Semantics.Extensions; + using SysML2.NET.Semantics.Implied; + using SysML2.NET.Semantics.Implied.Rules; + + [TestFixture] + public class ServiceCollectionExtensionsTestFixture + { + [Test] + public void VerifyAddSysML2Semantics() + { + using (Assert.EnterMultipleScope()) + { + Assert.That(() => ((IServiceCollection)null).AddSysML2Semantics(), Throws.TypeOf()); + Assert.That(() => ((IServiceCollection)null).AddSysML2Semantics(_ => { }), Throws.TypeOf()); + Assert.That(() => new ServiceCollection().AddSysML2Semantics(null), Throws.TypeOf()); + } + + var services = new ServiceCollection(); + + Assert.That(services.AddSysML2Semantics(options => options.EnableLibrarySpecializations = true), Is.SameAs(services)); + + using var serviceProvider = services.BuildServiceProvider(); + + using (Assert.EnterMultipleScope()) + { + Assert.That(serviceProvider.GetRequiredService().EnableLibrarySpecializations, Is.True); + Assert.That(serviceProvider.GetServices().ToList(), Is.Not.Empty); + Assert.That(serviceProvider.GetService(), Is.Null); + } + } + + [Test] + public void VerifyAddImpliedRelationshipRule() + { + Assert.That(() => ((IServiceCollection)null).AddImpliedRelationshipRule(), Throws.TypeOf()); + + var services = new ServiceCollection(); + + using (Assert.EnterMultipleScope()) + { + Assert.That(services.Any(descriptor => descriptor.ServiceType == typeof(IImpliedRelationshipRule)), Is.False); + Assert.That(services.AddImpliedRelationshipRule(), Is.SameAs(services)); + } + + var descriptors = services.Where(descriptor => descriptor.ServiceType == typeof(IImpliedRelationshipRule)).ToList(); + + using (Assert.EnterMultipleScope()) + { + Assert.That(descriptors, Has.Count.EqualTo(1)); + Assert.That(descriptors[0].ImplementationType, Is.EqualTo(typeof(VariationUsageSpecializationRule))); + Assert.That(descriptors[0].Lifetime, Is.EqualTo(ServiceLifetime.Scoped)); + } + } + + [Test] + public void VerifyAddLibraryTypeIndex() + { + using (Assert.EnterMultipleScope()) + { + Assert.That(() => ((IServiceCollection)null).AddLibraryTypeIndex([]), Throws.TypeOf()); + Assert.That(() => new ServiceCollection().AddLibraryTypeIndex(null), Throws.TypeOf()); + } + + var services = new ServiceCollection(); + + Assert.That(services.AddLibraryTypeIndex([]), Is.SameAs(services)); + + using var emptyProvider = services.BuildServiceProvider(); + + Assert.That(emptyProvider.GetRequiredService(), Is.Not.Null); + + var libraryPackage = new Package { DeclaredName = "Base" }; + + using var populatedProvider = new ServiceCollection().AddLibraryTypeIndex([libraryPackage]).BuildServiceProvider(); + + Assert.That(populatedProvider.GetRequiredService(), Is.Not.Null); + } + } +} diff --git a/SysML2.NET.Semantics.Tests/Implied/Guards/ImpliedRuleGuardTestFixture.cs b/SysML2.NET.Semantics.Tests/Implied/Guards/ImpliedRuleGuardTestFixture.cs index 0182dc59e..74cfcff4d 100644 --- a/SysML2.NET.Semantics.Tests/Implied/Guards/ImpliedRuleGuardTestFixture.cs +++ b/SysML2.NET.Semantics.Tests/Implied/Guards/ImpliedRuleGuardTestFixture.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Semantics.Tests.Implied.Guards using SysML2.NET.Core.POCO.Systems.Actions; using SysML2.NET.Core.POCO.Systems.Connections; using SysML2.NET.Core.POCO.Systems.Parts; + using SysML2.NET.Core.POCO.Systems.Requirements; using SysML2.NET.Semantics.Implied; using SysML2.NET.Semantics.Implied.Guards; @@ -120,6 +121,34 @@ public void VerifyActionUsageOwnedActionSpecializationGuard() } } + [Test] + public void VerifyRequirementUsageSubrequirementSpecializationGuard() + { + var guard = new RequirementUsageSubrequirementSpecializationGuard(); + + var ownedByDefinition = CreateSubrequirement(true, new RequirementDefinition { Id = Guid.NewGuid() }, new FeatureMembership { Id = Guid.NewGuid() }); + var ownedByUsage = CreateSubrequirement(true, new RequirementUsage { Id = Guid.NewGuid() }, new FeatureMembership { Id = Guid.NewGuid() }); + var notComposite = CreateSubrequirement(false, new RequirementDefinition { Id = Guid.NewGuid() }, new FeatureMembership { Id = Guid.NewGuid() }); + var ownedByPlainType = CreateSubrequirement(true, new Class { Id = Guid.NewGuid() }, new FeatureMembership { Id = Guid.NewGuid() }); + var constrainedRequirement = CreateSubrequirement(true, new RequirementDefinition { Id = Guid.NewGuid() }, new RequirementConstraintMembership { Id = Guid.NewGuid() }); + + using (Assert.EnterMultipleScope()) + { + Assert.That(guard.ConstraintName, Is.EqualTo("checkRequirementUsageSubrequirementSpecialization")); + Assert.That(guard.Applies(ownedByDefinition), Is.True); + Assert.That(guard.Applies(ownedByUsage), Is.True); + + Assert.That(guard.Applies(notComposite), Is.False); + Assert.That(guard.Applies(ownedByPlainType), Is.False); + + // Ownership via a RequirementConstraintMembership excludes the subrequirement Specialization. + Assert.That(guard.Applies(constrainedRequirement), Is.False); + + Assert.That(guard.Applies(new Feature { Id = Guid.NewGuid() }), Is.False); + Assert.That(() => guard.Applies(null), Throws.TypeOf()); + } + } + [Test] public void VerifyFeatureEndSpecializationGuard() { @@ -272,6 +301,16 @@ private static IImpliedRuleGuard Generated(string constraintName) return guard; } + private static RequirementUsage CreateSubrequirement(bool isComposite, IElement owner, IFeatureMembership membership) + { + var requirementUsage = new RequirementUsage { Id = Guid.NewGuid(), IsComposite = isComposite }; + + ((IContainedRelationship)membership).OwnedRelatedElement.Add(requirementUsage); + ((IContainedElement)owner).OwnedRelationship.Add(membership); + + return requirementUsage; + } + private static Feature CreateEnd(bool isEnd, IElement owner) { var end = new Feature { Id = Guid.NewGuid(), IsEnd = isEnd }; diff --git a/SysML2.NET.Semantics.Tests/Implied/ImpliedRuleGuardRegistryTestFixture.cs b/SysML2.NET.Semantics.Tests/Implied/ImpliedRuleGuardRegistryTestFixture.cs index b660bd31d..1b4e1f093 100644 --- a/SysML2.NET.Semantics.Tests/Implied/ImpliedRuleGuardRegistryTestFixture.cs +++ b/SysML2.NET.Semantics.Tests/Implied/ImpliedRuleGuardRegistryTestFixture.cs @@ -23,11 +23,13 @@ namespace SysML2.NET.Semantics.Tests.Implied using System; using System.Linq; + using Microsoft.Extensions.DependencyInjection; + using NUnit.Framework; using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Semantics.Extensions; using SysML2.NET.Semantics.Implied; - using SysML2.NET.Semantics.Implied.Guards; [TestFixture] public class ImpliedRuleGuardRegistryTestFixture @@ -82,33 +84,21 @@ public void VerifyConstructor() [Test] public void VerifyEveryConditionalConstraintHasAGuard() { - var registry = new ImpliedRuleGuardRegistry( - [ - ..GeneratedImpliedRuleGuards.All, - new AcceptActionUsageSubactionSpecializationGuard(), - new AssociationBinarySpecializationGuard(), - new AssociationStructureBinarySpecializationGuard(), - new ConnectorBinaryObjectSpecializationGuard(), - new ConnectorBinarySpecializationGuard(), - new ConnectorObjectSpecializationGuard(), - new FeatureEndSpecializationGuard(), - new FeaturePortionSpecializationGuard(), - new FeatureSubobjectSpecializationGuard(), - new FeatureSuboccurrenceSpecializationGuard(), - new FlowDefinitionBinarySpecializationGuard(), - new IncludeUseCaseUsageSpecializationGuard(), - new OccurrenceUsageSuboccurrenceSpecializationGuard(), - new StepOwnedPerformanceSpecializationGuard(), - new StepSubperformanceSpecializationGuard(), - new TransitionUsageActionSpecializationGuard(), - new TransitionUsageStateSpecializationGuard() - ]); + using var serviceProvider = new ServiceCollection().AddSysML2Semantics().BuildServiceProvider(); + + // Construction throws on two guards deciding one constraint, so this also proves discovery + // does not re-register the generated guards. + var registry = new ImpliedRuleGuardRegistry(serviceProvider.GetServices()); var unguarded = ImpliedRelationshipTable.AllConditionalConstraintNames .Where(constraintName => !registry.HasGuard(constraintName)) .ToList(); - Assert.That(unguarded, Is.Empty, $"These conditional constraints have no guard: {string.Join(", ", unguarded)}"); + using (Assert.EnterMultipleScope()) + { + Assert.That(unguarded, Is.Empty, $"These conditional constraints have no guard: {string.Join(", ", unguarded)}"); + Assert.That(registry.HasGuard("checkAbsentConstraint"), Is.False); + } } private sealed class StubGuard : IImpliedRuleGuard diff --git a/SysML2.NET.Semantics/AutoGenImplied/GeneratedImpliedRuleGuards.cs b/SysML2.NET.Semantics/AutoGenImplied/GeneratedImpliedRuleGuards.cs index 64c2dc18f..2eb847308 100644 --- a/SysML2.NET.Semantics/AutoGenImplied/GeneratedImpliedRuleGuards.cs +++ b/SysML2.NET.Semantics/AutoGenImplied/GeneratedImpliedRuleGuards.cs @@ -110,8 +110,6 @@ public static class GeneratedImpliedRuleGuards new GeneratedRuleGuard("checkRenderingUsageSubrenderingSpecialization", element => element is SysML2.NET.Core.POCO.Systems.Views.IRenderingUsage { owningType: SysML2.NET.Core.POCO.Systems.Views.IRenderingDefinition or SysML2.NET.Core.POCO.Systems.Views.IRenderingUsage }), // owningFeatureMembership <> null and owningFeatureMembership.oclIsKindOf(RequirementVerificationMembership) new GeneratedRuleGuard("checkRequirementUsageRequirementVerificationSpecialization", element => element is SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage { owningFeatureMembership: SysML2.NET.Core.POCO.Systems.VerificationCases.IRequirementVerificationMembership }), - // isComposite and owningType <> null and (owningType.oclIsKindOf(RequirementDefinition) or owningType.oclIsKindOf(RequirementUsage)) - new GeneratedRuleGuard("checkRequirementUsageSubrequirementSpecialization", element => element is SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage { IsComposite: true, owningType: SysML2.NET.Core.POCO.Systems.Requirements.IRequirementDefinition or SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage }), // isSubactionUsage() new GeneratedRuleGuard("checkSendActionUsageSubactionSpecialization", element => element is SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage guardSubject && guardSubject.IsSubactionUsage()), // isSubstateUsage(false) diff --git a/SysML2.NET.Semantics/AutoGenImplied/ImpliedRelationshipTable.cs b/SysML2.NET.Semantics/AutoGenImplied/ImpliedRelationshipTable.cs index 67b4f33a4..a63ef0950 100644 --- a/SysML2.NET.Semantics/AutoGenImplied/ImpliedRelationshipTable.cs +++ b/SysML2.NET.Semantics/AutoGenImplied/ImpliedRelationshipTable.cs @@ -550,6 +550,7 @@ public static class ImpliedRelationshipTable "Actions::Action::ifSubactions", "Actions::Action::joins", "Actions::Action::merges", + "Actions::Action::sendSubactions", "Actions::Action::subactions", "Actions::Action::terminateSubactions", "Actions::Action::whileLoops", @@ -2358,7 +2359,7 @@ public static IReadOnlyList QueryImpliedLibrarySpe new("checkOccurrenceUsageSuboccurrenceSpecialization", "Occurrences::Occurrence::suboccurrences", "OccurrenceUsage", true), new("checkOccurrenceUsageTimeSliceSpecialization", "Occurrences::Occurrence::timeSlices", "OccurrenceUsage", true), new("checkSendActionUsageSpecialization", "Actions::sendActions", "SendActionUsage", false), - new("checkSendActionUsageSubactionSpecialization", "Actions::Action::acceptSubactions", "SendActionUsage", true), + new("checkSendActionUsageSubactionSpecialization", "Actions::Action::sendSubactions", "SendActionUsage", true), new("checkStepEnclosedPerformanceSpecialization", "Performances::Performance::enclosedPerformances", "Step", true), new("checkStepOwnedPerformanceSpecialization", "Objects::Object::ownedPerformances", "Step", true), new("checkStepSpecialization", "Performances::performances", "Step", false), diff --git a/SysML2.NET.Semantics/Extensions/ServiceCollectionExtensions.cs b/SysML2.NET.Semantics/Extensions/ServiceCollectionExtensions.cs index 84b542f8d..cb3b73661 100644 --- a/SysML2.NET.Semantics/Extensions/ServiceCollectionExtensions.cs +++ b/SysML2.NET.Semantics/Extensions/ServiceCollectionExtensions.cs @@ -22,6 +22,7 @@ namespace SysML2.NET.Semantics.Extensions { using System; using System.Collections.Generic; + using System.Linq; using Microsoft.Extensions.DependencyInjection; @@ -34,6 +35,21 @@ namespace SysML2.NET.Semantics.Extensions /// public static class ServiceCollectionExtensions { + /// + /// Gets the hand-written implementations declared by the semantics assembly. + /// + /// + /// The parameterless-constructor filter is what excludes , whose + /// instances carry a constraint name and predicate supplied by the generated table. + /// + private static IEnumerable HandWrittenGuardTypes => + typeof(IImpliedRuleGuard).Assembly + .GetTypes() + .Where(type => type.IsClass + && !type.IsAbstract + && typeof(IImpliedRuleGuard).IsAssignableFrom(type) + && type.GetConstructor(Type.EmptyTypes) != null); + /// /// Registers the implied-relationship services with their default configuration. /// @@ -129,23 +145,10 @@ public static IServiceCollection AddSysML2Semantics(this IServiceCollection serv services.AddSingleton(generatedGuard); } - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); - services.AddImpliedRuleGuard(); + foreach (var guardType in HandWrittenGuardTypes) + { + services.AddScoped(typeof(IImpliedRuleGuard), guardType); + } return services; } @@ -165,25 +168,6 @@ public static IServiceCollection AddImpliedRelationshipRule(this IService : services.AddScoped(); } - /// - /// Registers a guard for a conditional semantic constraint. - /// - /// The guard to register. - /// The service collection to register with. - /// The same service collection, to allow chaining. - /// Thrown when is null. - /// - /// Guards are registered explicitly rather than discovered by assembly scanning, so the registered - /// set stays visible in source and the assembly stays trimmable. - /// - public static IServiceCollection AddImpliedRuleGuard(this IServiceCollection services) - where TGuard : class, IImpliedRuleGuard - { - return services == null - ? throw new ArgumentNullException(nameof(services)) - : services.AddScoped(); - } - /// /// Registers an built from the supplied library root Namespaces. /// @@ -191,6 +175,11 @@ public static IServiceCollection AddImpliedRuleGuard(this IServiceCollec /// The library root Namespaces to index. /// The same service collection, to allow chaining. /// Thrown when either argument is null. + /// + /// The semantic constraint set resolves library Types a model need not import, so the Namespaces + /// must come from a complete library load; an incomplete set indexes without error and surfaces as + /// an when a rule resolves its target. + /// public static IServiceCollection AddLibraryTypeIndex(this IServiceCollection services, IEnumerable libraryNamespaces) { if (services == null) diff --git a/SysML2.NET.Semantics/Implied/Guards/RequirementUsageSubrequirementSpecializationGuard.cs b/SysML2.NET.Semantics/Implied/Guards/RequirementUsageSubrequirementSpecializationGuard.cs new file mode 100644 index 000000000..7268b766c --- /dev/null +++ b/SysML2.NET.Semantics/Implied/Guards/RequirementUsageSubrequirementSpecializationGuard.cs @@ -0,0 +1,62 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Semantics.Implied.Guards +{ + using System; + + using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Core.POCO.Systems.Requirements; + + /// + /// Guards checkRequirementUsageSubrequirementSpecialization: a composite RequirementUsage owned by a + /// RequirementDefinition or RequirementUsage, but not via a RequirementConstraintMembership, specializes + /// Requirements::RequirementCheck::subrequirements. + /// + /// + /// OCL: isComposite and owningType <> null and (owningType.oclIsKindOf(RequirementDefinition) or + /// owningType.oclIsKindOf(RequirementUsage)) and not + /// owningFeatureMembership.oclIsKindOf(RequirementConstraintMembership) implies + /// specializesFromLibrary('Requirements::RequirementCheck::subrequirements') + /// + public class RequirementUsageSubrequirementSpecializationGuard : IImpliedRuleGuard + { + /// + /// Gets the name of the semantic constraint this guard decides. + /// + public string ConstraintName => "checkRequirementUsageSubrequirementSpecialization"; + + /// + /// Asserts whether the constraint applies to the supplied Element. + /// + /// The Element under evaluation. + /// True when the constraint applies. + /// Thrown when is null. + public bool Applies(IElement element) + { + if (element == null) + { + throw new ArgumentNullException(nameof(element)); + } + + return element is IRequirementUsage { IsComposite: true, owningType: IRequirementDefinition or IRequirementUsage, owningFeatureMembership: not IRequirementConstraintMembership }; + } + } +} diff --git a/SysML2.NET.Tests/Extend/RenderingUsageExtensionsTestFixture.cs b/SysML2.NET.Tests/Extend/RenderingUsageExtensionsTestFixture.cs index 056b5c04c..379b0e69a 100644 --- a/SysML2.NET.Tests/Extend/RenderingUsageExtensionsTestFixture.cs +++ b/SysML2.NET.Tests/Extend/RenderingUsageExtensionsTestFixture.cs @@ -25,6 +25,7 @@ namespace SysML2.NET.Tests.Extend using NUnit.Framework; using SysML2.NET.Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Systems.Parts; using SysML2.NET.Core.POCO.Systems.Views; using SysML2.NET.Exceptions; @@ -59,5 +60,33 @@ public void VerifyComputeRenderingDefinition() renderingUsage.AssignOwnership(new FeatureTyping { Type = secondRenderingDefinition }); Assert.That(() => renderingUsage.ComputeRenderingDefinition(), Throws.TypeOf()); } + + [Test] + public void VerifyComputeRedefinedNamingFeatureOperation() + { + Assert.That(() => ((IRenderingUsage)null).ComputeRedefinedNamingFeatureOperation(), Throws.TypeOf()); + + var renderingUsage = new RenderingUsage(); + + // Neither conjunct holds: no owningFeatureMembership and no ownedReferenceSubsetting → the + // OccurrenceUsage-level redefinition decides, which yields null for an unowned Usage. + Assert.That(renderingUsage.ComputeRedefinedNamingFeatureOperation(), Is.Null); + + // Owned via a ViewRenderingMembership, but still without an ownedReferenceSubsetting. + var viewDefinition = new ViewDefinition(); + viewDefinition.AssignOwnership(new ViewRenderingMembership(), renderingUsage); + Assert.That(renderingUsage.ComputeRedefinedNamingFeatureOperation(), Is.Null); + + // Both conjuncts hold: the featureTarget of the referencedFeature is the naming Feature. + var referencedFeature = new Feature(); + renderingUsage.AssignOwnership(new ReferenceSubsetting { ReferencedFeature = referencedFeature }); + Assert.That(renderingUsage.ComputeRedefinedNamingFeatureOperation(), Is.SameAs(referencedFeature)); + + // A plain FeatureMembership owner falls back to the OccurrenceUsage-level redefinition. + var plainlyOwnedRendering = new RenderingUsage(); + plainlyOwnedRendering.AssignOwnership(new ReferenceSubsetting { ReferencedFeature = referencedFeature }); + new ViewDefinition().AssignOwnership(new FeatureMembership(), plainlyOwnedRendering); + Assert.That(plainlyOwnedRendering.ComputeRedefinedNamingFeatureOperation(), Is.Not.SameAs(referencedFeature)); + } } } diff --git a/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs index a9ff82b8a..5df5953bd 100644 --- a/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs @@ -1571,8 +1571,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs index 0f97d4cdb..234f4eefb 100644 --- a/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs @@ -1537,8 +1537,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs b/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs index 6f4abd517..71afa5550 100644 --- a/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs @@ -1635,8 +1635,9 @@ List Root.Elements.IRelationship.Target /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs index 68bdc806a..3395f79e6 100644 --- a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs @@ -1682,8 +1682,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs b/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs index b85afd891..8e11c79ef 100644 --- a/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs @@ -1609,8 +1609,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs index c819c49eb..0b012db15 100644 --- a/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs @@ -1561,8 +1561,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs b/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs index 67471ae58..9eba48fab 100644 --- a/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs @@ -1446,8 +1446,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs b/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs index 0b93d7fb1..833f2f274 100644 --- a/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs +++ b/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs @@ -1211,8 +1211,9 @@ List Root.Elements.IRelationship.Target /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs b/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs index c8687add4..e5647340a 100644 --- a/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs @@ -1556,8 +1556,9 @@ List Root.Elements.IRelationship.Target /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs b/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs index b2d5a724a..2c92fc802 100644 --- a/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs @@ -1175,8 +1175,9 @@ public BooleanExpression() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs b/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs index 1096ba974..fa3f56f4b 100644 --- a/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs @@ -1632,8 +1632,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs index 47f06a48d..2987d2137 100644 --- a/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs @@ -1664,8 +1664,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs b/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs index 346c6e7d2..5bbff5f2e 100644 --- a/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs @@ -1252,8 +1252,9 @@ string IOperatorExpression.Operator /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs b/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs index 6e00626f9..b59446216 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs @@ -1694,8 +1694,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs index 99a9d8d7f..786ff4255 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs @@ -1628,8 +1628,9 @@ List Root.Elements.IRelationship.Target /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/Connector.cs b/SysML2.NET/Core/AutoGenPoco/Connector.cs index b2d5298cf..d27c70885 100644 --- a/SysML2.NET/Core/AutoGenPoco/Connector.cs +++ b/SysML2.NET/Core/AutoGenPoco/Connector.cs @@ -1213,8 +1213,9 @@ List Root.Elements.IRelationship.Target /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs b/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs index 43381d0e8..095d868e0 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs @@ -1594,8 +1594,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs b/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs index 18a35b2dc..030c74581 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs @@ -1208,8 +1208,9 @@ public ConstructorExpression() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs b/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs index f560b2b3c..e261e622f 100644 --- a/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs @@ -1552,8 +1552,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs b/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs index 8c6b75623..91440b73f 100644 --- a/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs @@ -1450,8 +1450,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs index ec2db67b3..e4cb61b0c 100644 --- a/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs @@ -1481,8 +1481,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs b/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs index 4af39ba65..f716239ed 100644 --- a/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs @@ -1645,8 +1645,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/Expression.cs b/SysML2.NET/Core/AutoGenPoco/Expression.cs index 0c59f3ef3..0705f5d1d 100644 --- a/SysML2.NET/Core/AutoGenPoco/Expression.cs +++ b/SysML2.NET/Core/AutoGenPoco/Expression.cs @@ -1169,8 +1169,9 @@ public Expression() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/Feature.cs b/SysML2.NET/Core/AutoGenPoco/Feature.cs index 7d20ca198..c27467c36 100644 --- a/SysML2.NET/Core/AutoGenPoco/Feature.cs +++ b/SysML2.NET/Core/AutoGenPoco/Feature.cs @@ -1087,8 +1087,9 @@ public Feature() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs b/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs index 2541c29fe..f2e151fd5 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs @@ -1262,8 +1262,9 @@ string IOperatorExpression.Operator /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs b/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs index 003f91b50..69dc4a97e 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs @@ -1207,8 +1207,9 @@ public FeatureReferenceExpression() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/Flow.cs b/SysML2.NET/Core/AutoGenPoco/Flow.cs index 42bdf23f0..3fdc6a7fc 100644 --- a/SysML2.NET/Core/AutoGenPoco/Flow.cs +++ b/SysML2.NET/Core/AutoGenPoco/Flow.cs @@ -1283,8 +1283,9 @@ List Root.Elements.IRelationship.Target /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs b/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs index ef49b9550..82eac8b5e 100644 --- a/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs +++ b/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs @@ -1077,8 +1077,9 @@ public FlowEnd() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs b/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs index ca307103f..1ad038078 100644 --- a/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs @@ -1734,8 +1734,9 @@ List Root.Elements.IRelationship.Target /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs index 888dba9a9..d21807731 100644 --- a/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs @@ -1562,8 +1562,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/ForkNode.cs b/SysML2.NET/Core/AutoGenPoco/ForkNode.cs index 87d43d607..b4f53c583 100644 --- a/SysML2.NET/Core/AutoGenPoco/ForkNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/ForkNode.cs @@ -1553,8 +1553,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/IFeature.cs b/SysML2.NET/Core/AutoGenPoco/IFeature.cs index abb11b85b..c6e4e780c 100644 --- a/SysML2.NET/Core/AutoGenPoco/IFeature.cs +++ b/SysML2.NET/Core/AutoGenPoco/IFeature.cs @@ -407,8 +407,9 @@ public partial interface IFeature : IType /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/IRenderingUsage.cs b/SysML2.NET/Core/AutoGenPoco/IRenderingUsage.cs index 8ab221554..6fc0d283f 100644 --- a/SysML2.NET/Core/AutoGenPoco/IRenderingUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IRenderingUsage.cs @@ -78,6 +78,15 @@ public partial interface IRenderingUsage : IPartUsage [RedefinedProperty(propertyName: "_19_0_2_12e503d9_1591475180488_929065_121")] IRenderingDefinition renderingDefinition { get; } + /// + /// The naming Feature of a RenderingUsage that is owned via a ViewRenderingMembership and has an + /// ownedReferenceSubsetting is the featureTarget of the referencedFeature of that + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + new IFeature NamingFeature(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs index 7991f570a..2f5fbf4dc 100644 --- a/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs @@ -1560,8 +1560,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs index d7532bf4d..6ebd8ef3d 100644 --- a/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs @@ -1732,8 +1732,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs b/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs index 318faa44b..230d8632c 100644 --- a/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs @@ -1252,8 +1252,9 @@ string IOperatorExpression.Operator /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs b/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs index 921ca9eb8..ce4410a38 100644 --- a/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs @@ -1635,8 +1635,9 @@ List Root.Elements.IRelationship.Target /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/Invariant.cs b/SysML2.NET/Core/AutoGenPoco/Invariant.cs index 3495feb13..a694ba371 100644 --- a/SysML2.NET/Core/AutoGenPoco/Invariant.cs +++ b/SysML2.NET/Core/AutoGenPoco/Invariant.cs @@ -1183,8 +1183,9 @@ public Invariant() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs b/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs index 9a92c1144..d311abfc7 100644 --- a/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs @@ -1224,8 +1224,9 @@ public InvocationExpression() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs b/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs index 7f90f7446..d73ab14ec 100644 --- a/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs @@ -1472,8 +1472,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/JoinNode.cs b/SysML2.NET/Core/AutoGenPoco/JoinNode.cs index a1f287df1..38e1ffbfa 100644 --- a/SysML2.NET/Core/AutoGenPoco/JoinNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/JoinNode.cs @@ -1553,8 +1553,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs b/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs index 1ad0cb02c..16630e36d 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs @@ -1196,8 +1196,9 @@ public LiteralBoolean() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs b/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs index 3b8f984fe..26a23ef31 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs @@ -1188,8 +1188,9 @@ public LiteralExpression() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs b/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs index 804e0fcf1..2cc08f153 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs @@ -1189,8 +1189,9 @@ public LiteralInfinity() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs b/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs index 28d17a4b1..418b225b7 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs @@ -1196,8 +1196,9 @@ public LiteralInteger() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs b/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs index 6f6191a7f..99841bfcb 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs @@ -1196,8 +1196,9 @@ public LiteralRational() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralString.cs b/SysML2.NET/Core/AutoGenPoco/LiteralString.cs index d62ff1d6e..168701251 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralString.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralString.cs @@ -1196,8 +1196,9 @@ public LiteralString() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/MergeNode.cs b/SysML2.NET/Core/AutoGenPoco/MergeNode.cs index 4bf4ad066..652e4d635 100644 --- a/SysML2.NET/Core/AutoGenPoco/MergeNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/MergeNode.cs @@ -1553,8 +1553,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs b/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs index c93e7e00d..8bd6a3297 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs @@ -1214,8 +1214,9 @@ public MetadataAccessExpression() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs b/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs index b66db3a1d..1802e1775 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs @@ -1151,8 +1151,9 @@ public MetadataFeature() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs b/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs index 519af0ae4..9fee88e6a 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs @@ -1559,8 +1559,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs b/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs index 3a8eccec7..ce15b850a 100644 --- a/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs +++ b/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs @@ -1084,8 +1084,9 @@ public Multiplicity() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs b/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs index c11105c75..7047337e1 100644 --- a/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs +++ b/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs @@ -1123,8 +1123,9 @@ public MultiplicityRange() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/NullExpression.cs b/SysML2.NET/Core/AutoGenPoco/NullExpression.cs index 7a311f376..56165cbd6 100644 --- a/SysML2.NET/Core/AutoGenPoco/NullExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/NullExpression.cs @@ -1188,8 +1188,9 @@ public NullExpression() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs index 50a2bdb91..2ab0ea634 100644 --- a/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs @@ -1461,8 +1461,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs b/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs index ae4ea1748..c9156a759 100644 --- a/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs @@ -1237,8 +1237,9 @@ public OperatorExpression() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/PartUsage.cs b/SysML2.NET/Core/AutoGenPoco/PartUsage.cs index 1cc8cfa31..fd92dc2cf 100644 --- a/SysML2.NET/Core/AutoGenPoco/PartUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/PartUsage.cs @@ -1479,8 +1479,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs b/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs index d7cc24deb..d94f38028 100644 --- a/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs +++ b/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs @@ -1075,8 +1075,9 @@ public PayloadFeature() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs index cfc734550..e26ce8c87 100644 --- a/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs @@ -1575,8 +1575,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/PortUsage.cs b/SysML2.NET/Core/AutoGenPoco/PortUsage.cs index 513ce47e1..8dc889da5 100644 --- a/SysML2.NET/Core/AutoGenPoco/PortUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/PortUsage.cs @@ -1468,8 +1468,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs index 445349a4b..fb82967eb 100644 --- a/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs @@ -1442,8 +1442,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs b/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs index f365c0209..7578f47cc 100644 --- a/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs @@ -1448,7 +1448,8 @@ bool Core.Features.IFeature.IsVariable public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); /// - /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// The naming Feature of a RenderingUsage that is owned via a ViewRenderingMembership and has an + /// ownedReferenceSubsetting is the featureTarget of the referencedFeature of that /// ownedReferenceSubsetting. /// /// @@ -1456,6 +1457,15 @@ bool Core.Features.IFeature.IsVariable /// public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + IFeature IUsage.NamingFeature() => this.NamingFeature(); + /// /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first /// ownedRedefinition, if any. @@ -1487,8 +1497,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs b/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs index 8544b0302..fc72567d7 100644 --- a/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs @@ -1682,8 +1682,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs b/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs index 7a503d796..814da927b 100644 --- a/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs @@ -1720,8 +1720,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs b/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs index c4edfa7cc..5f952b105 100644 --- a/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs @@ -1252,8 +1252,9 @@ string IOperatorExpression.Operator /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs index e82592739..7e9f0035e 100644 --- a/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs @@ -1560,8 +1560,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/StateUsage.cs b/SysML2.NET/Core/AutoGenPoco/StateUsage.cs index 3a4039849..942234d87 100644 --- a/SysML2.NET/Core/AutoGenPoco/StateUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/StateUsage.cs @@ -1597,8 +1597,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/Step.cs b/SysML2.NET/Core/AutoGenPoco/Step.cs index 38f4dfa90..c90eaf95d 100644 --- a/SysML2.NET/Core/AutoGenPoco/Step.cs +++ b/SysML2.NET/Core/AutoGenPoco/Step.cs @@ -1095,8 +1095,9 @@ public Step() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/Succession.cs b/SysML2.NET/Core/AutoGenPoco/Succession.cs index 30348d011..f02e3e93f 100644 --- a/SysML2.NET/Core/AutoGenPoco/Succession.cs +++ b/SysML2.NET/Core/AutoGenPoco/Succession.cs @@ -1210,8 +1210,9 @@ List Root.Elements.IRelationship.Target /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs b/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs index 7c35cd891..1ed3fa967 100644 --- a/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs @@ -1556,8 +1556,9 @@ List Root.Elements.IRelationship.Target /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs b/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs index 845c52125..54a01b2b6 100644 --- a/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs +++ b/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs @@ -1284,8 +1284,9 @@ List Root.Elements.IRelationship.Target /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs b/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs index bc3525cd1..9b1b56884 100644 --- a/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs @@ -1734,8 +1734,9 @@ List Root.Elements.IRelationship.Target /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs index 4935d57e3..61c82c914 100644 --- a/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs @@ -1546,8 +1546,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs b/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs index d2dee190b..926b4c934 100644 --- a/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs @@ -1595,8 +1595,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs b/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs index 19709db0a..14edb880f 100644 --- a/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs @@ -1240,8 +1240,9 @@ public TriggerInvocationExpression() /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/Usage.cs b/SysML2.NET/Core/AutoGenPoco/Usage.cs index c49a785cf..a102685e7 100644 --- a/SysML2.NET/Core/AutoGenPoco/Usage.cs +++ b/SysML2.NET/Core/AutoGenPoco/Usage.cs @@ -1426,8 +1426,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs index 09a8f0a09..6aee35d29 100644 --- a/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs @@ -1681,8 +1681,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs index 6790e84bf..8758b3e87 100644 --- a/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs @@ -1680,8 +1680,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs b/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs index fc1483199..3146c84c7 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs @@ -1535,8 +1535,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs b/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs index 533a04f0a..2ce79cbba 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs @@ -1699,8 +1699,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs index 07a8c99fb..892d2a52d 100644 --- a/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs @@ -1562,8 +1562,9 @@ bool Core.Features.IFeature.IsVariable /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// The expected diff --git a/SysML2.NET/Extend/FeatureExtensions.cs b/SysML2.NET/Extend/FeatureExtensions.cs index 1148f20f4..a54dfa49d 100644 --- a/SysML2.NET/Extend/FeatureExtensions.cs +++ b/SysML2.NET/Extend/FeatureExtensions.cs @@ -28,6 +28,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.Core.Types; using SysML2.NET.Core.POCO.Core.Types; + using SysML2.NET.Core.POCO.Kernel.Connectors; using SysML2.NET.Core.POCO.Kernel.FeatureValues; using SysML2.NET.Core.POCO.Kernel.Metadata; using SysML2.NET.Core.POCO.Root.Namespaces; @@ -1114,8 +1115,9 @@ internal static bool ComputeIsOwnedCrossFeatureOperation(this IFeature featureSu /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// Feature that is a Feature, but not a Multiplicity, MetadataFeature, or BindingConnector, and whose + /// owningMembership is not a FeatureMembership or FeatureValue. If this exists, it is the crossFeature + /// of the end Feature. /// /// /// OCL (KerML XMI): @@ -1124,17 +1126,16 @@ internal static bool ComputeIsOwnedCrossFeatureOperation(this IFeature featureSu /// else /// let ownedMemberFeatures: Sequence(Feature) = /// ownedMember->selectByKind(Feature)-> - /// reject(oclIsKindOf(Multiplicity) or - /// oclIsKindOf(MetadataFeature) or - /// oclIsKindOf(FeatureValue))-> - /// reject(owningMembership.oclIsKindOf(FeatureMembership)) in + /// reject(oclIsKindOf(Multiplicity) or + /// oclIsKindOf(MetadataFeature) or + /// oclIsKindOf(BindingConnector))-> + /// reject(owningMembership.oclIsKindOf(FeatureMembership) or + /// owningMembership.oclIsKindOf(FeatureValue)) in /// if ownedMemberFeatures.isEmpty() then null /// else ownedMemberFeatures->first() /// endif + /// endif /// - /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the - /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership - /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. /// /// /// The subject @@ -1157,12 +1158,12 @@ internal static IFeature ComputeOwnedCrossFeatureOperation(this IFeature feature return featureSubject.OwnedRelationship .OfType() - .Where(om => om is not IFeatureMembership) - .SelectMany(om => om.OwnedRelatedElement) + .Where(owningMembership => owningMembership is not IFeatureMembership and not IFeatureValue) + .SelectMany(owningMembership => owningMembership.OwnedRelatedElement) .OfType() - .Where(f => f is not IMultiplicity - && f is not IMetadataFeature - && f is not IFeatureValue) + .Where(ownedMemberFeature => ownedMemberFeature is not IMultiplicity + and not IMetadataFeature + and not IBindingConnector) .FirstOrDefault(); } diff --git a/SysML2.NET/Extend/RenderingUsageExtensions.cs b/SysML2.NET/Extend/RenderingUsageExtensions.cs index 6c8e239d8..ab42cf6b4 100644 --- a/SysML2.NET/Extend/RenderingUsageExtensions.cs +++ b/SysML2.NET/Extend/RenderingUsageExtensions.cs @@ -94,5 +94,47 @@ internal static IRenderingDefinition ComputeRenderingDefinition(this IRenderingU : FeatureExtensions.ComputeType(renderingUsageSubject).SingleOrDefaultStrict(nameof(renderingUsageSubject)); } + /// + /// The naming Feature of a RenderingUsage that is owned via a ViewRenderingMembership and has an + /// ownedReferenceSubsetting is the featureTarget of the referencedFeature of that + /// ownedReferenceSubsetting. + /// + /// + /// OCL2.0: + /// + /// if owningFeatureMembership <> null and + /// owningFeatureMembership.oclIsKindOf(ViewRenderingMembership) and + /// ownedReferenceSubsetting <> null then + /// ownedReferenceSubsetting.referencedFeature.featureTarget + /// else + /// self.oclAsType(OccurrenceUsage).namingFeature() + /// endif + /// + /// + /// + /// The subject + /// + /// + /// The expected + /// + /// + /// Thrown when is null. + /// + [Operation(name: nameof(IRenderingUsage.NamingFeature))] + internal static IFeature ComputeRedefinedNamingFeatureOperation(this IRenderingUsage renderingUsageSubject) + { + if (renderingUsageSubject == null) + { + throw new ArgumentNullException(nameof(renderingUsageSubject)); + } + + if (renderingUsageSubject.owningFeatureMembership is IViewRenderingMembership + && renderingUsageSubject.ownedReferenceSubsetting != null) + { + return renderingUsageSubject.ownedReferenceSubsetting.ReferencedFeature.featureTarget; + } + + return UsageExtensions.ComputeRedefinedNamingFeatureOperation(renderingUsageSubject); + } } } diff --git a/SysML2.NET/Extend/TypeExtensions.cs b/SysML2.NET/Extend/TypeExtensions.cs index 1a0cc858d..ac586980d 100644 --- a/SysML2.NET/Extend/TypeExtensions.cs +++ b/SysML2.NET/Extend/TypeExtensions.cs @@ -138,8 +138,10 @@ internal static List ComputeFeature(this IType typeSubject) /// /// OCL2.0: /// - /// featureMembership = ownedFeatureMembership->union( - /// inheritedMembership->selectByKind(FeatureMembership)) + /// featureMembership = ownedFeatureMembership-> + /// union(inheritedMembership-> + /// selectByKind(FeatureMembership)-> + /// select(mem | self.specializes(mem.owningType))) /// /// /// @@ -153,7 +155,9 @@ internal static List ComputeFeatureMembership(this IType typ { return typeSubject == null ? throw new ArgumentNullException(nameof(typeSubject)) - : [..typeSubject.ownedFeatureMembership.Union(typeSubject.inheritedMembership.OfType())]; + : [..typeSubject.ownedFeatureMembership.Union(typeSubject.inheritedMembership + .OfType() + .Where(featureMembership => typeSubject.Specializes(featureMembership.owningType)))]; } /// diff --git a/SysML2.NET/Extend/UsageExtensions.cs b/SysML2.NET/Extend/UsageExtensions.cs index 039dc9b4c..49551ac11 100644 --- a/SysML2.NET/Extend/UsageExtensions.cs +++ b/SysML2.NET/Extend/UsageExtensions.cs @@ -487,7 +487,7 @@ internal static List ComputeNestedItem(this IUsage usageSubject) /// /// OCL2.0: /// - /// nestedMetadata = nestedUsage->selectByKind(MetadataUsage) + /// nestedMetadata = ownedMember->selectByKind(MetadataUsage) /// /// /// @@ -501,7 +501,7 @@ internal static List ComputeNestedMetadata(this IUsage usageSubj { return usageSubject == null ? throw new ArgumentNullException(nameof(usageSubject)) - : [..usageSubject.nestedUsage.OfType()]; + : [..usageSubject.ownedMember.OfType()]; } ///