diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/AnnotatingElementExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/AnnotatingElementExtensions.cs
index 35c20cec4..b0fc501c6 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/AnnotatingElementExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/AnnotatingElementExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Root.Annotations
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Root.Elements;
using SysML2.NET.Core.POCO.Root.Namespaces;
@@ -35,6 +37,14 @@ internal static class AnnotatingElementExtensions
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// annotatedElement =
+ /// if annotation->notEmpty() then annotation.annotatedElement
+ /// else Sequence{owningNamespace} endif
+ ///
+ ///
///
/// The subject
///
@@ -42,6 +52,7 @@ internal static class AnnotatingElementExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IAnnotatingElement.annotatedElement))]
internal static List ComputeAnnotatedElement(this IAnnotatingElement annotatingElementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -50,6 +61,15 @@ internal static List ComputeAnnotatedElement(this IAnnotatingElement a
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// annotation =
+ /// if owningAnnotatingRelationship = null then ownedAnnotatingRelationship
+ /// else owningAnnotatingRelationship->prepend(owningAnnotatingRelationship)
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -57,6 +77,7 @@ internal static List ComputeAnnotatedElement(this IAnnotatingElement a
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IAnnotatingElement.annotation))]
internal static List ComputeAnnotation(this IAnnotatingElement annotatingElementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -65,6 +86,14 @@ internal static List ComputeAnnotation(this IAnnotatingElement anno
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedAnnotatingRelationship = ownedRelationship->
+ /// selectByKind(Annotation)->
+ /// select(a | a.annotatedElement <> self)
+ ///
+ ///
///
/// The subject
///
@@ -72,6 +101,7 @@ internal static List ComputeAnnotation(this IAnnotatingElement anno
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IAnnotatingElement.ownedAnnotatingRelationship))]
internal static List ComputeOwnedAnnotatingRelationship(this IAnnotatingElement annotatingElementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -87,6 +117,7 @@ internal static List ComputeOwnedAnnotatingRelationship(this IAnnot
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IAnnotatingElement.owningAnnotatingRelationship))]
internal static IAnnotation ComputeOwningAnnotatingRelationship(this IAnnotatingElement annotatingElementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/AssociationExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/AssociationExtensions.cs
index b3eb6d794..5f2a23bdb 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/AssociationExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/AssociationExtensions.cs
@@ -23,6 +23,10 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Classifiers;
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Core.POCO.Core.Types;
@@ -46,6 +50,7 @@ internal static class AssociationExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IAssociation.associationEnd))]
internal static List ComputeAssociationEnd(this IAssociation associationSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -54,6 +59,12 @@ internal static List ComputeAssociationEnd(this IAssociation associati
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// relatedType = associationEnd.type
+ ///
+ ///
///
/// The subject
///
@@ -61,6 +72,7 @@ internal static List ComputeAssociationEnd(this IAssociation associati
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IAssociation.relatedType))]
internal static List ComputeRelatedType(this IAssociation associationSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -69,6 +81,14 @@ internal static List ComputeRelatedType(this IAssociation associationSubj
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// sourceType =
+ /// if relatedType->isEmpty() then null
+ /// else relatedType->first() endif
+ ///
+ ///
///
/// The subject
///
@@ -76,6 +96,7 @@ internal static List ComputeRelatedType(this IAssociation associationSubj
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IAssociation.sourceType))]
internal static IType ComputeSourceType(this IAssociation associationSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -84,6 +105,18 @@ internal static IType ComputeSourceType(this IAssociation associationSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// targetType =
+ /// if relatedType->size() < 2 then OrderedSet{}
+ /// else
+ /// relatedType->
+ /// subSequence(2, relatedType->size())->
+ /// asOrderedSet()
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -91,6 +124,7 @@ internal static IType ComputeSourceType(this IAssociation associationSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IAssociation.targetType))]
internal static List ComputeTargetType(this IAssociation associationSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/DependencyExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/DependencyExtensions.cs
index 3eea36a6c..d76b88996 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/DependencyExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/DependencyExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Root.Dependencies
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Root.Annotations;
using SysML2.NET.Core.POCO.Root.Elements;
using SysML2.NET.Core.POCO.Root.Namespaces;
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/ElementExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/ElementExtensions.cs
index eeb28540e..ec4618289 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/ElementExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/ElementExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Root.Elements
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Root.Annotations;
using SysML2.NET.Core.POCO.Root.Namespaces;
@@ -35,6 +37,12 @@ internal static class ElementExtensions
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// documentation = ownedElement->selectByKind(Documentation)
+ ///
+ ///
///
/// The subject
///
@@ -42,6 +50,7 @@ internal static class ElementExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IElement.documentation))]
internal static List ComputeDocumentation(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -50,6 +59,12 @@ internal static List ComputeDocumentation(this IElement elementS
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// isLibraryElement = libraryNamespace() <> null
+ ///
+ ///
///
/// The subject
///
@@ -57,6 +72,7 @@ internal static List ComputeDocumentation(this IElement elementS
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IElement.isLibraryElement))]
internal static bool ComputeIsLibraryElement(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -65,6 +81,12 @@ internal static bool ComputeIsLibraryElement(this IElement elementSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// name = effectiveName()
+ ///
+ ///
///
/// The subject
///
@@ -72,6 +94,7 @@ internal static bool ComputeIsLibraryElement(this IElement elementSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IElement.name))]
internal static string ComputeName(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -80,6 +103,14 @@ internal static string ComputeName(this IElement elementSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedAnnotation = ownedRelationship->
+ /// selectByKind(Annotation)->
+ /// select(a | a.annotatedElement = self)
+ ///
+ ///
///
/// The subject
///
@@ -87,6 +118,7 @@ internal static string ComputeName(this IElement elementSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IElement.ownedAnnotation))]
internal static List ComputeOwnedAnnotation(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -95,6 +127,12 @@ internal static List ComputeOwnedAnnotation(this IElement elementSu
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedElement = ownedRelationship.ownedRelatedElement
+ ///
+ ///
///
/// The subject
///
@@ -102,6 +140,7 @@ internal static List ComputeOwnedAnnotation(this IElement elementSu
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IElement.ownedElement))]
internal static List ComputeOwnedElement(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -110,6 +149,12 @@ internal static List ComputeOwnedElement(this IElement elementSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// owner = owningRelationship.owningRelatedElement
+ ///
+ ///
///
/// The subject
///
@@ -117,6 +162,7 @@ internal static List ComputeOwnedElement(this IElement elementSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IElement.owner))]
internal static IElement ComputeOwner(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -132,6 +178,7 @@ internal static IElement ComputeOwner(this IElement elementSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IElement.owningMembership))]
internal static IOwningMembership ComputeOwningMembership(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -140,6 +187,15 @@ internal static IOwningMembership ComputeOwningMembership(this IElement elementS
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// owningNamespace =
+ /// if owningMembership = null then null
+ /// else owningMembership.membershipOwningNamespace
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -147,6 +203,7 @@ internal static IOwningMembership ComputeOwningMembership(this IElement elementS
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IElement.owningNamespace))]
internal static INamespace ComputeOwningNamespace(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -155,6 +212,21 @@ internal static INamespace ComputeOwningNamespace(this IElement elementSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// qualifiedName =
+ /// if owningNamespace = null then null
+ /// else if name <> null and
+ /// owningNamespace.ownedMember->
+ /// select(m | m.name = name).indexOf(self) <> 1 then null
+ /// else if owningNamespace.owner = null then escapedName()
+ /// else if owningNamespace.qualifiedName = null or
+ /// escapedName() = null then null
+ /// else owningNamespace.qualifiedName + '::' + escapedName()
+ /// endif endif endif endif
+ ///
+ ///
///
/// The subject
///
@@ -162,6 +234,7 @@ internal static INamespace ComputeOwningNamespace(this IElement elementSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IElement.qualifiedName))]
internal static string ComputeQualifiedName(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -170,6 +243,12 @@ internal static string ComputeQualifiedName(this IElement elementSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// shortName = effectiveShortName()
+ ///
+ ///
///
/// The subject
///
@@ -177,6 +256,7 @@ internal static string ComputeQualifiedName(this IElement elementSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IElement.shortName))]
internal static string ComputeShortName(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -185,6 +265,12 @@ internal static string ComputeShortName(this IElement elementSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// textualRepresentation = ownedElement->selectByKind(TextualRepresentation)
+ ///
+ ///
///
/// The subject
///
@@ -192,6 +278,7 @@ internal static string ComputeShortName(this IElement elementSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IElement.textualRepresentation))]
internal static List ComputeTextualRepresentation(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -210,6 +297,7 @@ internal static List ComputeTextualRepresentation(this I
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IElement.EscapedName))]
internal static string ComputeEscapedNameOperation(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -219,6 +307,12 @@ internal static string ComputeEscapedNameOperation(this IElement elementSubject)
/// Return an effective shortName for this Element. By default this is the same as its
/// declaredShortName.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// declaredShortName
+ ///
+ ///
///
/// The subject
///
@@ -226,6 +320,7 @@ internal static string ComputeEscapedNameOperation(this IElement elementSubject)
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IElement.EffectiveShortName))]
internal static string ComputeEffectiveShortNameOperation(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -234,6 +329,12 @@ internal static string ComputeEffectiveShortNameOperation(this IElement elementS
///
/// Return an effective name for this Element. By default this is the same as its declaredName.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// declaredName
+ ///
+ ///
///
/// The subject
///
@@ -241,6 +342,7 @@ internal static string ComputeEffectiveShortNameOperation(this IElement elementS
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IElement.EffectiveName))]
internal static string ComputeEffectiveNameOperation(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -249,6 +351,13 @@ internal static string ComputeEffectiveNameOperation(this IElement elementSubjec
///
/// By default, return the library Namespace of the owningRelationship of this Element, if it has one.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// if owningRelationship <> null then owningRelationship.libraryNamespace()
+ /// else null endif
+ ///
+ ///
///
/// The subject
///
@@ -256,6 +365,7 @@ internal static string ComputeEffectiveNameOperation(this IElement elementSubjec
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IElement.LibraryNamespace))]
internal static INamespace ComputeLibraryNamespaceOperation(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -267,9 +377,23 @@ internal static INamespace ComputeLibraryNamespaceOperation(this IElement elemen
/// an owningRelationship, then return the string constructed by appending to the path of it's
/// owningRelationship the character / followed by the string representation of its position in the list
/// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the
- /// empty string. (Note that this operation is overridden for Relationships
- /// to use owningRelatedElement when appropriate.)
+ /// empty string.(Note that this operation is overridden for Relationships to use owningRelatedElement
+ /// when appropriate.)
///
+ ///
+ /// OCL2.0:
+ ///
+ /// if qualifiedName <> null then qualifiedName
+ /// else if owningRelationship <> null then
+ /// owningRelationship.path() + '/' +
+ /// owningRelationship.ownedRelatedElement->indexOf(self).toString()
+ /// -- A position index shall be converted to a decimal string representation
+ /// -- consisting of only decimal digits, with no sign, leading zeros or leading
+ /// -- or trailing whitespace.
+ /// else ''
+ /// endif endif
+ ///
+ ///
///
/// The subject
///
@@ -277,6 +401,7 @@ internal static INamespace ComputeLibraryNamespaceOperation(this IElement elemen
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IElement.Path))]
internal static string ComputePathOperation(this IElement elementSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/EnumerationDefinitionExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/EnumerationDefinitionExtensions.cs
index f88dd6517..f60d04da9 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/EnumerationDefinitionExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/EnumerationDefinitionExtensions.cs
@@ -23,6 +23,10 @@ namespace SysML2.NET.Core.POCO.Systems.Enumerations
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Classifiers;
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Core.POCO.Core.Types;
@@ -67,6 +71,7 @@ internal static class EnumerationDefinitionExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IEnumerationDefinition.enumeratedValue))]
internal static List ComputeEnumeratedValue(this IEnumerationDefinition enumerationDefinitionSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FeatureExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FeatureExtensions.cs
index 004d42de3..a2831ef2d 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FeatureExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FeatureExtensions.cs
@@ -23,7 +23,10 @@ namespace SysML2.NET.Core.POCO.Core.Features
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Types;
using SysML2.NET.Core.POCO.Root.Annotations;
using SysML2.NET.Core.POCO.Root.Elements;
@@ -38,6 +41,12 @@ internal static class FeatureExtensions
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// chainingFeature = ownedFeatureChaining.chainingFeature
+ ///
+ ///
///
/// The subject
///
@@ -45,6 +54,7 @@ internal static class FeatureExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.chainingFeature))]
internal static List ComputeChainingFeature(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -53,6 +63,19 @@ internal static List ComputeChainingFeature(this IFeature featureSubje
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// crossFeature =
+ /// if ownedCrossSubsetting = null then null
+ /// else
+ /// let chainingFeatures: Sequence(Feature) =
+ /// ownedCrossSubsetting.crossedFeature.chainingFeature in
+ /// if chainingFeatures->size() < 2 then null
+ /// else chainingFeatures->at(2)
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -60,6 +83,7 @@ internal static List ComputeChainingFeature(this IFeature featureSubje
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.crossFeature))]
internal static IFeature ComputeCrossFeature(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -75,6 +99,7 @@ internal static IFeature ComputeCrossFeature(this IFeature featureSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.endOwningType))]
internal static IType ComputeEndOwningType(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -83,6 +108,12 @@ internal static IType ComputeEndOwningType(this IFeature featureSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// featureTarget = if chainingFeature->isEmpty() then self else chainingFeature->last() endif
+ ///
+ ///
///
/// The subject
///
@@ -90,6 +121,7 @@ internal static IType ComputeEndOwningType(this IFeature featureSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.featureTarget))]
internal static IFeature ComputeFeatureTarget(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -98,6 +130,20 @@ internal static IFeature ComputeFeatureTarget(this IFeature featureSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// featuringType =
+ /// let featuringTypes : OrderedSet(Type) =
+ /// typeFeaturing.type->asOrderedSet() in
+ /// if chainingFeature->isEmpty() then featuringTypes
+ /// else
+ /// featuringTypes->
+ /// union(chainingFeature->first().featuringType)->
+ /// asOrderedSet()
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -105,6 +151,7 @@ internal static IFeature ComputeFeatureTarget(this IFeature featureSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.featuringType))]
internal static List ComputeFeaturingType(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -113,6 +160,17 @@ internal static List ComputeFeaturingType(this IFeature featureSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedCrossSubsetting =
+ /// let crossSubsettings: Sequence(CrossSubsetting) =
+ /// ownedSubsetting->selectByKind(CrossSubsetting) in
+ /// if crossSubsettings->isEmpty() then null
+ /// else crossSubsettings->first()
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -120,6 +178,7 @@ internal static List ComputeFeaturingType(this IFeature featureSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.ownedCrossSubsetting))]
internal static ICrossSubsetting ComputeOwnedCrossSubsetting(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -128,6 +187,12 @@ internal static ICrossSubsetting ComputeOwnedCrossSubsetting(this IFeature featu
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedFeatureChaining = ownedRelationship->selectByKind(FeatureChaining)
+ ///
+ ///
///
/// The subject
///
@@ -135,6 +200,7 @@ internal static ICrossSubsetting ComputeOwnedCrossSubsetting(this IFeature featu
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.ownedFeatureChaining))]
internal static List ComputeOwnedFeatureChaining(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -143,6 +209,13 @@ internal static List ComputeOwnedFeatureChaining(this IFeature
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedFeatureInverting = ownedRelationship->selectByKind(FeatureInverting)->
+ /// select(fi | fi.featureInverted = self)
+ ///
+ ///
///
/// The subject
///
@@ -150,6 +223,7 @@ internal static List ComputeOwnedFeatureChaining(this IFeature
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.ownedFeatureInverting))]
internal static List ComputeOwnedFeatureInverting(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -158,6 +232,12 @@ internal static List ComputeOwnedFeatureInverting(this IFeatu
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedRedefinition = ownedSubsetting->selectByKind(Redefinition)
+ ///
+ ///
///
/// The subject
///
@@ -165,6 +245,7 @@ internal static List ComputeOwnedFeatureInverting(this IFeatu
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.ownedRedefinition))]
internal static List ComputeOwnedRedefinition(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -173,6 +254,16 @@ internal static List ComputeOwnedRedefinition(this IFeature featu
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedReferenceSubsetting =
+ /// let referenceSubsettings : OrderedSet(ReferenceSubsetting) =
+ /// ownedSubsetting->selectByKind(ReferenceSubsetting) in
+ /// if referenceSubsettings->isEmpty() then null
+ /// else referenceSubsettings->first() endif
+ ///
+ ///
///
/// The subject
///
@@ -180,6 +271,7 @@ internal static List ComputeOwnedRedefinition(this IFeature featu
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.ownedReferenceSubsetting))]
internal static IReferenceSubsetting ComputeOwnedReferenceSubsetting(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -188,6 +280,12 @@ internal static IReferenceSubsetting ComputeOwnedReferenceSubsetting(this IFeatu
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedSubsetting = ownedSpecialization->selectByKind(Subsetting)
+ ///
+ ///
///
/// The subject
///
@@ -195,6 +293,7 @@ internal static IReferenceSubsetting ComputeOwnedReferenceSubsetting(this IFeatu
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.ownedSubsetting))]
internal static List ComputeOwnedSubsetting(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -203,6 +302,13 @@ internal static List ComputeOwnedSubsetting(this IFeature featureSu
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedTypeFeaturing = ownedRelationship->selectByKind(TypeFeaturing)->
+ /// select(tf | tf.featureOfType = self)
+ ///
+ ///
///
/// The subject
///
@@ -210,6 +316,7 @@ internal static List ComputeOwnedSubsetting(this IFeature featureSu
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.ownedTypeFeaturing))]
internal static List ComputeOwnedTypeFeaturing(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -218,6 +325,12 @@ internal static List ComputeOwnedTypeFeaturing(this IFeature fea
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedTyping = ownedGeneralization->selectByKind(FeatureTyping)
+ ///
+ ///
///
/// The subject
///
@@ -225,6 +338,7 @@ internal static List ComputeOwnedTypeFeaturing(this IFeature fea
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.ownedTyping))]
internal static List ComputeOwnedTyping(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -240,6 +354,7 @@ internal static List ComputeOwnedTyping(this IFeature featureSub
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.owningFeatureMembership))]
internal static IFeatureMembership ComputeOwningFeatureMembership(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -255,6 +370,7 @@ internal static IFeatureMembership ComputeOwningFeatureMembership(this IFeature
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.owningType))]
internal static IType ComputeOwningType(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -263,6 +379,16 @@ internal static IType ComputeOwningType(this IFeature featureSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// type =
+ /// let types : OrderedSet(Types) = OrderedSet{self}->
+ /// -- Note: The closure operation automatically handles circular relationships.
+ /// closure(typingFeatures()).typing.type->asOrderedSet() in
+ /// types->reject(t1 | types->exist(t2 | t2 <> t1 and t2.specializes(t1)))
+ ///
+ ///
///
/// The subject
///
@@ -270,6 +396,7 @@ internal static IType ComputeOwningType(this IFeature featureSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeature.type))]
internal static List ComputeType(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -278,6 +405,12 @@ internal static List ComputeType(this IFeature featureSubject)
///
/// Return the directionOf this Feature relative to the given type.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// type.directionOf(self)
+ ///
+ ///
///
/// The subject
///
@@ -288,6 +421,7 @@ internal static List ComputeType(this IFeature featureSubject)
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.DirectionFor))]
internal static FeatureDirectionKind? ComputeDirectionForOperation(this IFeature featureSubject, IType type)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -297,6 +431,21 @@ internal static List ComputeType(this IFeature featureSubject)
/// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the
/// effective shortName of the Feature returned by the namingFeature() operation, if any.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// if declaredShortName <> null or declaredName <> null then
+ /// declaredShortName
+ /// else
+ /// let namingFeature : Feature = namingFeature() in
+ /// if namingFeature = null then
+ /// null
+ /// else
+ /// namingFeature.effectiveShortName()
+ /// endif
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -304,16 +453,31 @@ internal static List ComputeType(this IFeature featureSubject)
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.EffectiveShortName))]
internal static string ComputeRedefinedEffectiveShortNameOperation(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
}
///
- /// If a Feature has no declaredName or declaredShortName , then its
- /// effective name is given by the effective name of the Feature returned by the namingFeature()
- /// operation, if any.
+ /// If a Feature has no declaredName or declaredShortName, then its effective name is given by the
+ /// effective name of the Feature returned by the namingFeature() operation, if any.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// if declaredShortName <> null or declaredName <> null then
+ /// declaredName
+ /// else
+ /// let namingFeature : Feature = namingFeature() in
+ /// if namingFeature = null then
+ /// null
+ /// else
+ /// namingFeature.effectiveName()
+ /// endif
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -321,6 +485,7 @@ internal static string ComputeRedefinedEffectiveShortNameOperation(this IFeature
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.EffectiveName))]
internal static string ComputeRedefinedEffectiveNameOperation(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -330,6 +495,16 @@ internal static string ComputeRedefinedEffectiveNameOperation(this IFeature feat
/// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first
/// ownedRedefinition, if any.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// if ownedRedefinition->isEmpty() then
+ /// null
+ /// else
+ /// ownedRedefinition->at(1).redefinedFeature
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -337,6 +512,7 @@ internal static string ComputeRedefinedEffectiveNameOperation(this IFeature feat
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.NamingFeature))]
internal static IFeature ComputeNamingFeatureOperation(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -344,6 +520,16 @@ internal static IFeature ComputeNamingFeatureOperation(this IFeature featureSubj
///
///
+ ///
+ /// OCL2.0:
+ ///
+ /// let supertypes : OrderedSet(Type) =
+ /// self.oclAsType(Type).supertypes(excludeImplied) in
+ /// if featureTarget = self then supertypes
+ /// else supertypes->append(featureTarget)
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -354,6 +540,7 @@ internal static IFeature ComputeNamingFeatureOperation(this IFeature featureSubj
/// The expected collection of
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.Supertypes))]
internal static List ComputeRedefinedSupertypesOperation(this IFeature featureSubject, bool excludeImplied)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -362,6 +549,12 @@ internal static List ComputeRedefinedSupertypesOperation(this IFeature fe
///
/// Check whether this Feature directly redefines the given redefinedFeature.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedRedefinition.redefinedFeature->includes(redefinedFeature)
+ ///
+ ///
///
/// The subject
///
@@ -372,6 +565,7 @@ internal static List ComputeRedefinedSupertypesOperation(this IFeature fe
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.Redefines))]
internal static bool ComputeRedefinesOperation(this IFeature featureSubject, IFeature redefinedFeature)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -381,6 +575,14 @@ internal static bool ComputeRedefinesOperation(this IFeature featureSubject, IFe
/// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must
/// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// let mem: Membership = resolveGlobal(libraryFeatureName) in
+ /// mem <> null and mem.memberElement.oclIsKindOf(Feature) and
+ /// redefines(mem.memberElement.oclAsType(Feature))
+ ///
+ ///
///
/// The subject
///
@@ -391,6 +593,7 @@ internal static bool ComputeRedefinesOperation(this IFeature featureSubject, IFe
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.RedefinesFromLibrary))]
internal static bool ComputeRedefinesFromLibraryOperation(this IFeature featureSubject, string libraryFeatureName)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -400,6 +603,16 @@ internal static bool ComputeRedefinesFromLibraryOperation(this IFeature featureS
/// Check whether this Feature directly or indirectly specializes a Feature whose last two
/// chainingFeatures are the given Features first and second.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// allSuperTypes()->selectAsKind(Feature)->
+ /// exists(f | let n: Integer = f.chainingFeature->size() in
+ /// n >= 2 and
+ /// f.chainingFeature->at(n-1) = first and
+ /// f.chainingFeature->at(n) = second)
+ ///
+ ///
///
/// The subject
///
@@ -413,6 +626,7 @@ internal static bool ComputeRedefinesFromLibraryOperation(this IFeature featureS
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.SubsetsChain))]
internal static bool ComputeSubsetsChainOperation(this IFeature featureSubject, IFeature first, IFeature second)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -420,12 +634,23 @@ internal static bool ComputeSubsetsChainOperation(this IFeature featureSubject,
///
/// A Feature is compatible with an otherType if it either directly or indirectly specializes the
- /// otherType or if the otherType is also a Feature and all of the following are true.
- /// - Neither this Feature or the otherType have any
- /// ownedFeatures.
- This Feature directly or indirectly redefines a
- /// Feature that is also directly or indirectly redefined by the otherType.
- /// - This Feature can access the otherType.
- ///
+ /// otherType or if the otherType is also a Feature and all of the following are true. - Neither
+ /// this Feature or the otherType have any ownedFeatures.
- This Feature directly or indirectly
+ /// redefines a Feature that is also directly or indirectly redefined by the otherType.
- This
+ /// Feature can access the otherType.
+ ///
+ ///
+ /// OCL2.0:
+ ///
+ /// specializes(otherType) or
+ /// supertype.oclIsKindOf(Feature) and
+ /// ownedFeature->isEmpty() and
+ /// otherType.ownedFeature->isEmpty() and
+ /// ownedRedefinitions.allRedefinedFeatures()->exists(f |
+ /// otherType.oclAsType(Feature).allRedefinedFeatures()->includes(f)) and
+ /// canAccess(otherType.oclAsType(Feature))
+ ///
+ ///
///
/// The subject
///
@@ -436,6 +661,7 @@ internal static bool ComputeSubsetsChainOperation(this IFeature featureSubject,
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.IsCompatibleWith))]
internal static bool ComputeRedefinedIsCompatibleWithOperation(this IFeature featureSubject, IType otherType)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -445,12 +671,29 @@ internal static bool ComputeRedefinedIsCompatibleWithOperation(this IFeature fea
/// Return the Features used to determine the types of this Feature (other than this Feature itself). If
/// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except
/// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the
- /// typingFeatures are only its originalType (if the originalType is a Feature).
- /// Note. CrossSubsetting is excluded from the determination of the type of a
- /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships.
- /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type
- /// as the Feature.
- ///
+ /// typingFeatures are only its originalType (if the originalType is a Feature).Note.
+ /// CrossSubsetting is excluded from the determination of the type of a Feature in order to avoid
+ /// circularity in the construction of implied CrossSubsetting relationships. The
+ /// validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type as
+ /// the Feature.
+ ///
+ ///
+ /// OCL2.0:
+ ///
+ /// if not isConjugated then
+ /// let subsettedFeatures : OrderedSet(Feature) =
+ /// subsetting->reject(s | s.oclIsKindOf(CrossSubsetting)).subsettedFeatures in
+ /// if chainingFeature->isEmpty() or
+ /// subsettedFeature->includes(chainingFeature->last())
+ /// then subsettedFeatures
+ /// else subsettedFeatures->append(chainingFeature->last())
+ /// endif
+ /// else if conjugator.originalType.oclIsKindOf(Feature) then
+ /// OrderedSet{conjugator.originalType.oclAsType(Feature)}
+ /// else OrderedSet{}
+ /// endif endif
+ ///
+ ///
///
/// The subject
///
@@ -458,6 +701,7 @@ internal static bool ComputeRedefinedIsCompatibleWithOperation(this IFeature fea
/// The expected collection of
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.TypingFeatures))]
internal static List ComputeTypingFeaturesOperation(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -468,6 +712,15 @@ internal static List ComputeTypingFeaturesOperation(this IFeature feat
/// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a
/// valid value, it will just not represent anything useful.)
///
+ ///
+ /// OCL2.0:
+ ///
+ /// featuringType->select(t | t.owner <> self)->
+ /// union(featuringType->select(t | t.owner = self)->
+ /// selectByKind(Feature).asCartesianProduct())->
+ /// union(type)
+ ///
+ ///
///
/// The subject
///
@@ -475,6 +728,7 @@ internal static List ComputeTypingFeaturesOperation(this IFeature feat
/// The expected collection of
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.AsCartesianProduct))]
internal static List ComputeAsCartesianProductOperation(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -483,6 +737,16 @@ internal static List ComputeAsCartesianProductOperation(this IFeature fea
///
/// Check whether this Feature can be used to represent a Cartesian product of Types.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// type->size() = 1 and
+ /// featuringType.size() = 1 and
+ /// (featuringType.first().owner = self implies
+ /// featuringType.first().oclIsKindOf(Feature) and
+ /// featuringType.first().oclAsType(Feature).isCartesianProduct())
+ ///
+ ///
///
/// The subject
///
@@ -490,6 +754,7 @@ internal static List ComputeAsCartesianProductOperation(this IFeature fea
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.IsCartesianProduct))]
internal static bool ComputeIsCartesianProductOperation(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -498,6 +763,14 @@ internal static bool ComputeIsCartesianProductOperation(this IFeature featureSub
///
/// Return whether this Feature is an owned cross Feature of an end Feature.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// owningNamespace <> null and
+ /// owningNamespace.oclIsKindOf(Feature) and
+ /// owningNamespace.oclAsType(Feature).ownedCrossFeature() = self
+ ///
+ ///
///
/// The subject
///
@@ -505,6 +778,7 @@ internal static bool ComputeIsCartesianProductOperation(this IFeature featureSub
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.IsOwnedCrossFeature))]
internal static bool ComputeIsOwnedCrossFeatureOperation(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -515,6 +789,22 @@ internal static bool ComputeIsOwnedCrossFeatureOperation(this IFeature featureSu
/// 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.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// if not isEnd or owningType = null then null
+ /// else
+ /// let ownedMemberFeatures: Sequence(Feature) =
+ /// ownedMember->selectByKind(Feature)->
+ /// reject(oclIsKindOf(Multiplicity) or
+ /// oclIsKindOf(MetadataFeature) or
+ /// oclIsKindOf(FeatureValue))->
+ /// reject(owningMembership.oclIsKindOf(FeatureMembership)) in
+ /// if ownedMemberFeatures.isEmpty() then null
+ /// else ownedMemberFeatures->first()
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -522,6 +812,7 @@ internal static bool ComputeIsOwnedCrossFeatureOperation(this IFeature featureSu
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.OwnedCrossFeature))]
internal static IFeature ComputeOwnedCrossFeatureOperation(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -530,6 +821,14 @@ internal static IFeature ComputeOwnedCrossFeatureOperation(this IFeature feature
///
/// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedRedefinition.redefinedFeature->
+ /// closure(ownedRedefinition.redefinedFeature)->
+ /// asOrderedSet()->prepend(self)
+ ///
+ ///
///
/// The subject
///
@@ -537,6 +836,7 @@ internal static IFeature ComputeOwnedCrossFeatureOperation(this IFeature feature
/// The expected collection of
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.AllRedefinedFeatures))]
internal static List ComputeAllRedefinedFeaturesOperation(this IFeature featureSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -549,6 +849,19 @@ internal static List ComputeAllRedefinedFeaturesOperation(this IFeatur
/// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be
/// featured within the owningType of its first chainingFeature.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// if type = null then
+ /// featuringType->forAll(f | f = resolveGlobal('Base::Anything').memberElement)
+ /// else
+ /// featuringType->forAll(f | type.isCompatibleWith(f)) or
+ /// isVariable and type.specializes(owningType) or
+ /// chainingFeature->notEmpty() and chainingFeature->first().isVariable and
+ /// type.specializes(chainingFeature->first().owningType)
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -559,6 +872,7 @@ internal static List ComputeAllRedefinedFeaturesOperation(this IFeatur
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.IsFeaturedWithin))]
internal static bool ComputeIsFeaturedWithinOperation(this IFeature featureSubject, IType type)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -568,6 +882,23 @@ internal static bool ComputeIsFeaturedWithinOperation(this IFeature featureSubje
/// A Feature can access another feature if the other feature is featured within one of the direct or
/// indirect featuringTypes of this Feature.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// let anythingType: Element =
+ /// subsettingFeature.resolveGlobal('Base::Anything').memberElement in
+ /// let allFeaturingTypes : Sequence(Type) =
+ /// featuringTypes->closure(t |
+ /// if not t.oclIsKindOf(Feature) then Sequence{}
+ /// else
+ /// let featuringTypes : OrderedSet(Type) = t.oclAsType(Feature).featuringType in
+ /// if featuringTypes->isEmpty() then Sequence{anythingType}
+ /// else featuringTypes
+ /// endif
+ /// endif) in
+ /// allFeaturingTypes->exists(t | feature.isFeaturedWithin(t))
+ ///
+ ///
///
/// The subject
///
@@ -578,6 +909,7 @@ internal static bool ComputeIsFeaturedWithinOperation(this IFeature featureSubje
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.CanAccess))]
internal static bool ComputeCanAccessOperation(this IFeature featureSubject, IFeature feature)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -589,6 +921,21 @@ internal static bool ComputeCanAccessOperation(this IFeature featureSubject, IFe
/// true, then return true if the type is a Feature representing the snapshots of the owningType of this
/// Feature.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// owningType <> null and
+ /// if not isVariable then type = owningType
+ /// else if owningType = resolveGlobal('Occurrences::Occurrence').memberElement then
+ /// type = resolveGlobal('Occurrences::Occurrence::snapshots').memberElement
+ /// else
+ /// type.oclIsKindOf(Feature) and
+ /// let feature : Feature = type.oclAsType(Feature) in
+ /// feature.featuringType->includes(owningType) and
+ /// feature.redefinesFromLibrary('Occurrences::Occurrence::snapshots')
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -599,6 +946,7 @@ internal static bool ComputeCanAccessOperation(this IFeature featureSubject, IFe
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IFeature.IsFeaturingType))]
internal static bool ComputeIsFeaturingTypeOperation(this IFeature featureSubject, IType type)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FeatureTypingExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FeatureTypingExtensions.cs
index 0b0762c11..b987fc117 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FeatureTypingExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FeatureTypingExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Core.Features
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Core.Types;
using SysML2.NET.Core.POCO.Root.Annotations;
using SysML2.NET.Core.POCO.Root.Elements;
@@ -44,6 +46,7 @@ internal static class FeatureTypingExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFeatureTyping.owningFeature))]
internal static IFeature ComputeOwningFeature(this IFeatureTyping featureTypingSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FlowExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FlowExtensions.cs
index 604dd9bbb..2be96f617 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FlowExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FlowExtensions.cs
@@ -23,7 +23,10 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Classifiers;
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Core.POCO.Core.Types;
@@ -43,6 +46,12 @@ internal static class FlowExtensions
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// flowEnd = connectorEnd->selectByKind(FlowEnd)
+ ///
+ ///
///
/// The subject
///
@@ -50,6 +59,7 @@ internal static class FlowExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFlow.flowEnd))]
internal static List ComputeFlowEnd(this IFlow flowSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -65,6 +75,7 @@ internal static List ComputeFlowEnd(this IFlow flowSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFlow.interaction))]
internal static List ComputeInteraction(this IFlow flowSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -73,6 +84,17 @@ internal static List ComputeInteraction(this IFlow flowSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// payloadFeature =
+ /// let payloadFeatures : Sequence(PayloadFeature) =
+ /// ownedFeature->selectByKind(PayloadFeature) in
+ /// if payloadFeatures->isEmpty() then null
+ /// else payloadFeatures->first()
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -80,6 +102,7 @@ internal static List ComputeInteraction(this IFlow flowSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFlow.payloadFeature))]
internal static IPayloadFeature ComputePayloadFeature(this IFlow flowSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -88,6 +111,15 @@ internal static IPayloadFeature ComputePayloadFeature(this IFlow flowSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// payloadType =
+ /// if payloadFeature = null then Sequence{}
+ /// else payloadFeature.type
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -95,6 +127,7 @@ internal static IPayloadFeature ComputePayloadFeature(this IFlow flowSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFlow.payloadType))]
internal static List ComputePayloadType(this IFlow flowSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -103,6 +136,17 @@ internal static List ComputePayloadType(this IFlow flowSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// sourceOutputFeature =
+ /// if connectorEnd->isEmpty() or
+ /// connectorEnd.ownedFeature->isEmpty()
+ /// then null
+ /// else connectorEnd.ownedFeature->first()
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -110,6 +154,7 @@ internal static List ComputePayloadType(this IFlow flowSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFlow.sourceOutputFeature))]
internal static IFeature ComputeSourceOutputFeature(this IFlow flowSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -118,6 +163,17 @@ internal static IFeature ComputeSourceOutputFeature(this IFlow flowSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// targetInputFeature =
+ /// if connectorEnd->size() < 2 or
+ /// connectorEnd->at(2).ownedFeature->isEmpty()
+ /// then null
+ /// else connectorEnd->at(2).ownedFeature->first()
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -125,6 +181,7 @@ internal static IFeature ComputeSourceOutputFeature(this IFlow flowSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFlow.targetInputFeature))]
internal static IFeature ComputeTargetInputFeature(this IFlow flowSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FramedConcernMembershipExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FramedConcernMembershipExtensions.cs
index 28dd5fa59..a7fff8e60 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FramedConcernMembershipExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/FramedConcernMembershipExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.Systems.Requirements;
using SysML2.NET.Core.POCO.Core.Features;
@@ -48,6 +50,7 @@ internal static class FramedConcernMembershipExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFramedConcernMembership.ownedConcern))]
internal static IConcernUsage ComputeOwnedConcern(this IFramedConcernMembership framedConcernMembershipSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -63,6 +66,7 @@ internal static IConcernUsage ComputeOwnedConcern(this IFramedConcernMembership
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IFramedConcernMembership.referencedConcern))]
internal static IConcernUsage ComputeReferencedConcern(this IFramedConcernMembership framedConcernMembershipSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/LiteralIntegerExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/LiteralIntegerExtensions.cs
index 453f5e2ba..5e95ae3be 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/LiteralIntegerExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/LiteralIntegerExtensions.cs
@@ -23,7 +23,10 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Core.POCO.Core.Types;
using SysML2.NET.Core.POCO.Kernel.Behaviors;
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/LiteralRationalExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/LiteralRationalExtensions.cs
index 92c7140bd..c429b7246 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/LiteralRationalExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/LiteralRationalExtensions.cs
@@ -23,7 +23,10 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Core.POCO.Core.Types;
using SysML2.NET.Core.POCO.Kernel.Behaviors;
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/MembershipExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/MembershipExtensions.cs
index a565e8a3e..8b7a3cec7 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/MembershipExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/MembershipExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Root.Annotations;
using SysML2.NET.Core.POCO.Root.Elements;
@@ -36,6 +38,12 @@ internal static class MembershipExtensions
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// memberElementId = memberElement.elementId
+ ///
+ ///
///
/// The subject
///
@@ -43,6 +51,7 @@ internal static class MembershipExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IMembership.memberElementId))]
internal static string ComputeMemberElementId(this IMembership membershipSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -58,6 +67,7 @@ internal static string ComputeMemberElementId(this IMembership membershipSubject
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IMembership.membershipOwningNamespace))]
internal static INamespace ComputeMembershipOwningNamespace(this IMembership membershipSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -70,6 +80,19 @@ internal static INamespace ComputeMembershipOwningNamespace(this IMembership mem
/// of the memberElement of this Membership and the memberElement of the other Membership conform to the
/// other. But this may be overridden in specializations of Membership.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// not (memberElement.oclKindOf(other.memberElement.oclType()) or
+ /// other.memberElement.oclKindOf(memberElement.oclType())) or
+ /// (shortMemberName = null or
+ /// (shortMemberName <> other.shortMemberName and
+ /// shortMemberName <> other.memberName)) and
+ /// (memberName = null or
+ /// (memberName <> other.shortMemberName and
+ /// memberName <> other.memberName)))
+ ///
+ ///
///
/// The subject
///
@@ -80,6 +103,7 @@ internal static INamespace ComputeMembershipOwningNamespace(this IMembership mem
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IMembership.IsDistinguishableFrom))]
internal static bool ComputeIsDistinguishableFromOperation(this IMembership membershipSubject, IMembership other)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/MultiplicityRangeExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/MultiplicityRangeExtensions.cs
index 93c932108..999ca1757 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/MultiplicityRangeExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/MultiplicityRangeExtensions.cs
@@ -23,7 +23,10 @@ namespace SysML2.NET.Core.POCO.Kernel.Multiplicities
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Core.POCO.Core.Types;
using SysML2.NET.Core.POCO.Kernel.Functions;
@@ -40,6 +43,16 @@ internal static class MultiplicityRangeExtensions
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// bound =
+ /// if upperBound = null then Sequence{}
+ /// else if lowerBound = null then Sequence{upperBound}
+ /// else Sequence{lowerBound, upperBound}
+ /// endif endif
+ ///
+ ///
///
/// The subject
///
@@ -47,6 +60,7 @@ internal static class MultiplicityRangeExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IMultiplicityRange.bound))]
internal static List ComputeBound(this IMultiplicityRange multiplicityRangeSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -55,6 +69,17 @@ internal static List ComputeBound(this IMultiplicityRange multiplic
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// lowerBound =
+ /// let ownedExpressions : Sequence(Expression) =
+ /// ownedMember->selectByKind(Expression) in
+ /// if ownedExpressions->size() < 2 then null
+ /// else ownedExpressions->first()
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -62,6 +87,7 @@ internal static List ComputeBound(this IMultiplicityRange multiplic
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IMultiplicityRange.lowerBound))]
internal static IExpression ComputeLowerBound(this IMultiplicityRange multiplicityRangeSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -70,6 +96,18 @@ internal static IExpression ComputeLowerBound(this IMultiplicityRange multiplici
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// upperBound =
+ /// let ownedExpressions : Sequence(Expression) =
+ /// ownedMember->selectByKind(Expression) in
+ /// if ownedExpressions->isEmpty() then null
+ /// else if ownedExpressions->size() = 1 then ownedExpressions->at(1)
+ /// else ownedExpressions->at(2)
+ /// endif endif
+ ///
+ ///
///
/// The subject
///
@@ -77,6 +115,7 @@ internal static IExpression ComputeLowerBound(this IMultiplicityRange multiplici
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IMultiplicityRange.upperBound))]
internal static IExpression ComputeUpperBound(this IMultiplicityRange multiplicityRangeSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -86,6 +125,17 @@ internal static IExpression ComputeUpperBound(this IMultiplicityRange multiplici
/// Check whether this MultiplicityRange represents the range bounded by the given values lower and
/// upper, presuming the lowerBound and upperBound Expressions are model-level evaluable.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// valueOf(upperBound) = upper and
+ /// let lowerValue: UnlimitedNatural = valueOf(lowerBound) in
+ /// (lowerValue = lower or
+ /// lowerValue = null and
+ /// (lower = upper or
+ /// lower = 0 and upper = *))
+ ///
+ ///
///
/// The subject
///
@@ -99,6 +149,7 @@ internal static IExpression ComputeUpperBound(this IMultiplicityRange multiplici
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IMultiplicityRange.HasBounds))]
internal static bool ComputeHasBoundsOperation(this IMultiplicityRange multiplicityRangeSubject, int lower, string upper)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -108,6 +159,26 @@ internal static bool ComputeHasBoundsOperation(this IMultiplicityRange multiplic
/// Evaluate the given bound Expression (at model level) and return the result represented as a MOF
/// UnlimitedNatural value.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// if bound = null or not bound.isModelLevelEvaluable then
+ /// null
+ /// else
+ /// let boundEval: Sequence(Element) = bound.evaluate(owningType) in
+ /// if boundEval->size() <> 1 then null else
+ /// let valueEval: Element = boundEval->at(1) in
+ /// if valueEval.oclIsKindOf(LiteralInfinity) then *
+ /// else if valueEval.oclIsKindOf(LiteralInteger) then
+ /// let value : Integer =
+ /// valueEval.oclAsKindOf(LiteralInteger).value in
+ /// if value >= 0 then value else null endif
+ /// else null
+ /// endif endif
+ /// endif
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -118,6 +189,7 @@ internal static bool ComputeHasBoundsOperation(this IMultiplicityRange multiplic
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IMultiplicityRange.ValueOf))]
internal static string ComputeValueOfOperation(this IMultiplicityRange multiplicityRangeSubject, IExpression bound)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/OwningMembershipExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/OwningMembershipExtensions.cs
index e9adbc721..88b7c16bb 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/OwningMembershipExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/OwningMembershipExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Root.Annotations;
using SysML2.NET.Core.POCO.Root.Elements;
@@ -43,6 +45,7 @@ internal static class OwningMembershipExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IOwningMembership.ownedMemberElement))]
internal static IElement ComputeOwnedMemberElement(this IOwningMembership owningMembershipSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -58,6 +61,7 @@ internal static IElement ComputeOwnedMemberElement(this IOwningMembership owning
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IOwningMembership.ownedMemberElementId))]
internal static string ComputeOwnedMemberElementId(this IOwningMembership owningMembershipSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -66,6 +70,12 @@ internal static string ComputeOwnedMemberElementId(this IOwningMembership owning
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedMemberName = ownedMemberElement.name
+ ///
+ ///
///
/// The subject
///
@@ -73,6 +83,7 @@ internal static string ComputeOwnedMemberElementId(this IOwningMembership owning
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IOwningMembership.ownedMemberName))]
internal static string ComputeOwnedMemberName(this IOwningMembership owningMembershipSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -81,6 +92,12 @@ internal static string ComputeOwnedMemberName(this IOwningMembership owningMembe
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedMemberShortName = ownedMemberElement.shortName
+ ///
+ ///
///
/// The subject
///
@@ -88,6 +105,7 @@ internal static string ComputeOwnedMemberName(this IOwningMembership owningMembe
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IOwningMembership.ownedMemberShortName))]
internal static string ComputeOwnedMemberShortName(this IOwningMembership owningMembershipSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -98,6 +116,15 @@ internal static string ComputeOwnedMemberShortName(this IOwningMembership owning
/// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise,
/// return the path of the OwningMembership as specified for a Relationship in general.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// if ownedElement.qualifiedName <> null then
+ /// ownedElement.qualifiedName + '/owningMembership'
+ /// else self.oclAsType(Relationship).path()
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -105,6 +132,7 @@ internal static string ComputeOwnedMemberShortName(this IOwningMembership owning
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IOwningMembership.Path))]
internal static string ComputeRedefinedPathOperation(this IOwningMembership owningMembershipSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/ReferenceSubsettingExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/ReferenceSubsettingExtensions.cs
index 2d0ca2f2e..acad9b69e 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/ReferenceSubsettingExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/ReferenceSubsettingExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Core.Features
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Core.Types;
using SysML2.NET.Core.POCO.Root.Annotations;
using SysML2.NET.Core.POCO.Root.Elements;
@@ -44,6 +46,7 @@ internal static class ReferenceSubsettingExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IReferenceSubsetting.referencingFeature))]
internal static IFeature ComputeReferencingFeature(this IReferenceSubsetting referenceSubsettingSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/RelationshipExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/RelationshipExtensions.cs
index a331b8a2b..8855fb14c 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/RelationshipExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/RelationshipExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Root.Elements
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Root.Annotations;
using SysML2.NET.Core.POCO.Root.Namespaces;
@@ -35,6 +37,12 @@ internal static class RelationshipExtensions
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// relatedElement = source->union(target)
+ ///
+ ///
///
/// The subject
///
@@ -42,6 +50,7 @@ internal static class RelationshipExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IRelationship.relatedElement))]
internal static List ComputeRelatedElement(this IRelationship relationshipSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -51,6 +60,14 @@ internal static List ComputeRelatedElement(this IRelationship relation
/// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a
/// library element.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// if owningRelatedElement <> null then owningRelatedElement.libraryNamespace()
+ /// else if owningRelationship <> null then owningRelationship.libraryNamespace()
+ /// else null endif endif
+ ///
+ ///
///
/// The subject
///
@@ -58,6 +75,7 @@ internal static List ComputeRelatedElement(this IRelationship relation
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IRelationship.LibraryNamespace))]
internal static INamespace ComputeRedefinedLibraryNamespaceOperation(this IRelationship relationshipSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -69,6 +87,19 @@ internal static INamespace ComputeRedefinedLibraryNamespaceOperation(this IRelat
/// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in
/// general.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// if owningRelationship = null and owningRelatedElement <> null then
+ /// owningRelatedElement.path() + '/' +
+ /// owningRelatedElement.ownedRelationship->indexOf(self).toString()
+ /// -- A position index shall be converted to a decimal string representation
+ /// -- consisting of only decimal digits, with no sign, leading zeros or leading
+ /// -- or trailing whitespace.
+ /// else self.oclAsType(Element).path()
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -76,6 +107,7 @@ internal static INamespace ComputeRedefinedLibraryNamespaceOperation(this IRelat
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IRelationship.Path))]
internal static string ComputeRedefinedPathOperation(this IRelationship relationshipSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/RequirementUsageExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/RequirementUsageExtensions.cs
index 1ba1f57ad..5c91ec7ac 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/RequirementUsageExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/RequirementUsageExtensions.cs
@@ -23,7 +23,10 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.Systems.Occurrences;
using SysML2.NET.Core.POCO.Core.Classifiers;
using SysML2.NET.Core.POCO.Core.Features;
@@ -65,6 +68,14 @@ internal static class RequirementUsageExtensions
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// actorParameter = featureMembership->
+ /// selectByKind(ActorMembership).
+ /// ownedActorParameter
+ ///
+ ///
///
/// The subject
///
@@ -72,6 +83,7 @@ internal static class RequirementUsageExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IRequirementUsage.actorParameter))]
internal static List ComputeActorParameter(this IRequirementUsage requirementUsageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -80,6 +92,15 @@ internal static List ComputeActorParameter(this IRequirementUsage re
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// assumedConstraint = ownedFeatureMembership->
+ /// selectByKind(RequirementConstraintMembership)->
+ /// select(kind = RequirementConstraintKind::assumption).
+ /// ownedConstraint
+ ///
+ ///
///
/// The subject
///
@@ -87,6 +108,7 @@ internal static List ComputeActorParameter(this IRequirementUsage re
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IRequirementUsage.assumedConstraint))]
internal static List ComputeAssumedConstraint(this IRequirementUsage requirementUsageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -95,6 +117,14 @@ internal static List ComputeAssumedConstraint(this IRequiremen
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// framedConcern = featureMembership->
+ /// selectByKind(FramedConcernMembership).
+ /// ownedConcern
+ ///
+ ///
///
/// The subject
///
@@ -102,6 +132,7 @@ internal static List ComputeAssumedConstraint(this IRequiremen
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IRequirementUsage.framedConcern))]
internal static List ComputeFramedConcern(this IRequirementUsage requirementUsageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -110,6 +141,15 @@ internal static List ComputeFramedConcern(this IRequirementUsage
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// requiredConstraint = ownedFeatureMembership->
+ /// selectByKind(RequirementConstraintMembership)->
+ /// select(kind = RequirementConstraintKind::requirement).
+ /// ownedConstraint
+ ///
+ ///
///
/// The subject
///
@@ -117,6 +157,7 @@ internal static List ComputeFramedConcern(this IRequirementUsage
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IRequirementUsage.requiredConstraint))]
internal static List ComputeRequiredConstraint(this IRequirementUsage requirementUsageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -132,6 +173,7 @@ internal static List ComputeRequiredConstraint(this IRequireme
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IRequirementUsage.requirementDefinition))]
internal static IRequirementDefinition ComputeRequirementDefinition(this IRequirementUsage requirementUsageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -140,6 +182,14 @@ internal static IRequirementDefinition ComputeRequirementDefinition(this IRequir
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// stakeholderParameter = featureMembership->
+ /// selectByKind(AStakholderMembership).
+ /// ownedStakeholderParameter
+ ///
+ ///
///
/// The subject
///
@@ -147,6 +197,7 @@ internal static IRequirementDefinition ComputeRequirementDefinition(this IRequir
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IRequirementUsage.stakeholderParameter))]
internal static List ComputeStakeholderParameter(this IRequirementUsage requirementUsageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -155,6 +206,17 @@ internal static List ComputeStakeholderParameter(this IRequirementUs
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// subjectParameter =
+ /// let subjects : OrderedSet(SubjectMembership) =
+ /// featureMembership->selectByKind(SubjectMembership) in
+ /// if subjects->isEmpty() then null
+ /// else subjects->first().ownedSubjectParameter
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -162,6 +224,7 @@ internal static List ComputeStakeholderParameter(this IRequirementUs
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IRequirementUsage.subjectParameter))]
internal static IUsage ComputeSubjectParameter(this IRequirementUsage requirementUsageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -170,6 +233,12 @@ internal static IUsage ComputeSubjectParameter(this IRequirementUsage requiremen
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// text = documentation.body
+ ///
+ ///
///
/// The subject
///
@@ -177,6 +246,7 @@ internal static IUsage ComputeSubjectParameter(this IRequirementUsage requiremen
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IRequirementUsage.text))]
internal static List ComputeText(this IRequirementUsage requirementUsageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/SelectExpressionExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/SelectExpressionExtensions.cs
index c86871811..ad9807746 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/SelectExpressionExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/SelectExpressionExtensions.cs
@@ -23,7 +23,10 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Core.POCO.Core.Types;
using SysML2.NET.Core.POCO.Kernel.Behaviors;
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/SubclassificationExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/SubclassificationExtensions.cs
index 858b90edd..87d511c04 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/SubclassificationExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/SubclassificationExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Core.Classifiers
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Core.Types;
using SysML2.NET.Core.POCO.Root.Annotations;
using SysML2.NET.Core.POCO.Root.Elements;
@@ -44,6 +46,7 @@ internal static class SubclassificationExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(ISubclassification.owningClassifier))]
internal static IClassifier ComputeOwningClassifier(this ISubclassification subclassificationSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/TextualRepresentationExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/TextualRepresentationExtensions.cs
index fce6d2c38..72e6c8ae9 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/TextualRepresentationExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/TextualRepresentationExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Root.Annotations
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Root.Elements;
using SysML2.NET.Core.POCO.Root.Namespaces;
@@ -42,6 +44,7 @@ internal static class TextualRepresentationExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(ITextualRepresentation.representedElement))]
internal static IElement ComputeRepresentedElement(this ITextualRepresentation textualRepresentationSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/UsageExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/UsageExtensions.cs
index f967d7231..7c6ced157 100644
--- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/UsageExtensions.cs
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtend/UsageExtensions.cs
@@ -23,7 +23,10 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Classifiers;
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Core.POCO.Core.Types;
@@ -68,6 +71,7 @@ internal static class UsageExtensions
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.definition))]
internal static List ComputeDefinition(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -76,6 +80,12 @@ internal static List ComputeDefinition(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// directedUsage = directedFeature->selectByKind(Usage)
+ ///
+ ///
///
/// The subject
///
@@ -83,6 +93,7 @@ internal static List ComputeDefinition(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.directedUsage))]
internal static List ComputeDirectedUsage(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -91,6 +102,12 @@ internal static List ComputeDirectedUsage(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// isReference = not isComposite
+ ///
+ ///
///
/// The subject
///
@@ -98,6 +115,7 @@ internal static List ComputeDirectedUsage(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.isReference))]
internal static bool ComputeIsReference(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -106,6 +124,20 @@ internal static bool ComputeIsReference(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// mayTimeVary =
+ /// owningType <> null and
+ /// owningType.specializesFromLibrary('Occurrences::Occurrence') and
+ /// not (
+ /// isPortion or
+ /// specializesFromLibrary('Links::SelfLink') or
+ /// specializesFromLibrary('Occurrences::HappensLink') or
+ /// isComposite and specializesFromLibrary('Actions::Action')
+ /// )
+ ///
+ ///
///
/// The subject
///
@@ -113,6 +145,7 @@ internal static bool ComputeIsReference(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.mayTimeVary))]
internal static bool ComputeMayTimeVary(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -121,6 +154,12 @@ internal static bool ComputeMayTimeVary(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedAction = nestedUsage->selectByKind(ActionUsage)
+ ///
+ ///
///
/// The subject
///
@@ -128,6 +167,7 @@ internal static bool ComputeMayTimeVary(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedAction))]
internal static List ComputeNestedAction(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -136,6 +176,12 @@ internal static List ComputeNestedAction(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedAllocation = nestedUsage->selectByKind(AllocationUsage)
+ ///
+ ///
///
/// The subject
///
@@ -143,6 +189,7 @@ internal static List ComputeNestedAction(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedAllocation))]
internal static List ComputeNestedAllocation(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -151,6 +198,12 @@ internal static List ComputeNestedAllocation(this IUsage usage
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedAnalysisCase = nestedUsage->selectByKind(AnalysisCaseUsage)
+ ///
+ ///
///
/// The subject
///
@@ -158,6 +211,7 @@ internal static List ComputeNestedAllocation(this IUsage usage
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedAnalysisCase))]
internal static List ComputeNestedAnalysisCase(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -166,6 +220,12 @@ internal static List ComputeNestedAnalysisCase(this IUsage u
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedAttribute = nestedUsage->selectByKind(AttributeUsage)
+ ///
+ ///
///
/// The subject
///
@@ -173,6 +233,7 @@ internal static List ComputeNestedAnalysisCase(this IUsage u
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedAttribute))]
internal static List ComputeNestedAttribute(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -181,6 +242,12 @@ internal static List ComputeNestedAttribute(this IUsage usageSu
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedCalculation = nestedUsage->selectByKind(CalculationUsage)
+ ///
+ ///
///
/// The subject
///
@@ -188,6 +255,7 @@ internal static List ComputeNestedAttribute(this IUsage usageSu
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedCalculation))]
internal static List ComputeNestedCalculation(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -196,6 +264,12 @@ internal static List ComputeNestedCalculation(this IUsage usa
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedCase = nestedUsage->selectByKind(CaseUsage)
+ ///
+ ///
///
/// The subject
///
@@ -203,6 +277,7 @@ internal static List ComputeNestedCalculation(this IUsage usa
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedCase))]
internal static List ComputeNestedCase(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -211,6 +286,12 @@ internal static List ComputeNestedCase(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedConcern = nestedUsage->selectByKind(ConcernUsage)
+ ///
+ ///
///
/// The subject
///
@@ -218,6 +299,7 @@ internal static List ComputeNestedCase(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedConcern))]
internal static List ComputeNestedConcern(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -226,6 +308,12 @@ internal static List ComputeNestedConcern(this IUsage usageSubjec
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedConnection = nestedUsage->selectByKind(ConnectorAsUsage)
+ ///
+ ///
///
/// The subject
///
@@ -233,6 +321,7 @@ internal static List ComputeNestedConcern(this IUsage usageSubjec
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedConnection))]
internal static List ComputeNestedConnection(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -241,6 +330,12 @@ internal static List ComputeNestedConnection(this IUsage usag
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedConstraint = nestedUsage->selectByKind(ConstraintUsage)
+ ///
+ ///
///
/// The subject
///
@@ -248,6 +343,7 @@ internal static List ComputeNestedConnection(this IUsage usag
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedConstraint))]
internal static List ComputeNestedConstraint(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -256,6 +352,12 @@ internal static List ComputeNestedConstraint(this IUsage usage
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// ownedNested = nestedUsage->selectByKind(EnumerationUsage)
+ ///
+ ///
///
/// The subject
///
@@ -263,6 +365,7 @@ internal static List ComputeNestedConstraint(this IUsage usage
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedEnumeration))]
internal static List ComputeNestedEnumeration(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -271,6 +374,12 @@ internal static List ComputeNestedEnumeration(this IUsage usa
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedFlow = nestedUsage->selectByKind(FlowUsage)
+ ///
+ ///
///
/// The subject
///
@@ -278,6 +387,7 @@ internal static List ComputeNestedEnumeration(this IUsage usa
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedFlow))]
internal static List ComputeNestedFlow(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -286,6 +396,12 @@ internal static List ComputeNestedFlow(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedInterface = nestedUsage->selectByKind(ReferenceUsage)
+ ///
+ ///
///
/// The subject
///
@@ -293,6 +409,7 @@ internal static List ComputeNestedFlow(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedInterface))]
internal static List ComputeNestedInterface(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -301,6 +418,12 @@ internal static List ComputeNestedInterface(this IUsage usageSu
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedItem = nestedUsage->selectByKind(ItemUsage)
+ ///
+ ///
///
/// The subject
///
@@ -308,6 +431,7 @@ internal static List ComputeNestedInterface(this IUsage usageSu
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedItem))]
internal static List ComputeNestedItem(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -316,6 +440,12 @@ internal static List ComputeNestedItem(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedMetadata = nestedUsage->selectByKind(MetadataUsage)
+ ///
+ ///
///
/// The subject
///
@@ -323,6 +453,7 @@ internal static List ComputeNestedItem(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedMetadata))]
internal static List ComputeNestedMetadata(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -331,6 +462,12 @@ internal static List ComputeNestedMetadata(this IUsage usageSubj
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedOccurrence = nestedUsage->selectByKind(OccurrenceUsage)
+ ///
+ ///
///
/// The subject
///
@@ -338,6 +475,7 @@ internal static List ComputeNestedMetadata(this IUsage usageSubj
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedOccurrence))]
internal static List ComputeNestedOccurrence(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -346,6 +484,12 @@ internal static List ComputeNestedOccurrence(this IUsage usage
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedPart = nestedUsage->selectByKind(PartUsage)
+ ///
+ ///
///
/// The subject
///
@@ -353,6 +497,7 @@ internal static List ComputeNestedOccurrence(this IUsage usage
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedPart))]
internal static List ComputeNestedPart(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -361,6 +506,12 @@ internal static List ComputeNestedPart(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedPort = nestedUsage->selectByKind(PortUsage)
+ ///
+ ///
///
/// The subject
///
@@ -368,6 +519,7 @@ internal static List ComputeNestedPart(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedPort))]
internal static List ComputeNestedPort(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -376,6 +528,12 @@ internal static List ComputeNestedPort(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedReference = nestedUsage->selectByKind(ReferenceUsage)
+ ///
+ ///
///
/// The subject
///
@@ -383,6 +541,7 @@ internal static List ComputeNestedPort(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedReference))]
internal static List ComputeNestedReference(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -391,6 +550,12 @@ internal static List ComputeNestedReference(this IUsage usageSu
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedRendering = nestedUsage->selectByKind(RenderingUsage)
+ ///
+ ///
///
/// The subject
///
@@ -398,6 +563,7 @@ internal static List ComputeNestedReference(this IUsage usageSu
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedRendering))]
internal static List ComputeNestedRendering(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -406,6 +572,12 @@ internal static List ComputeNestedRendering(this IUsage usageSu
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedRequirement = nestedUsage->selectByKind(RequirementUsage)
+ ///
+ ///
///
/// The subject
///
@@ -413,6 +585,7 @@ internal static List ComputeNestedRendering(this IUsage usageSu
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedRequirement))]
internal static List ComputeNestedRequirement(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -421,6 +594,12 @@ internal static List ComputeNestedRequirement(this IUsage usa
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedState = nestedUsage->selectByKind(StateUsage)
+ ///
+ ///
///
/// The subject
///
@@ -428,6 +607,7 @@ internal static List ComputeNestedRequirement(this IUsage usa
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedState))]
internal static List ComputeNestedState(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -436,6 +616,12 @@ internal static List ComputeNestedState(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedTransition = nestedUsage->selectByKind(TransitionUsage)
+ ///
+ ///
///
/// The subject
///
@@ -443,6 +629,7 @@ internal static List ComputeNestedState(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedTransition))]
internal static List ComputeNestedTransition(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -451,6 +638,12 @@ internal static List ComputeNestedTransition(this IUsage usage
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedUsage = ownedFeature->selectByKind(Usage)
+ ///
+ ///
///
/// The subject
///
@@ -458,6 +651,7 @@ internal static List ComputeNestedTransition(this IUsage usage
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedUsage))]
internal static List ComputeNestedUsage(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -466,6 +660,12 @@ internal static List ComputeNestedUsage(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedUseCase = nestedUsage->selectByKind(UseCaseUsage)
+ ///
+ ///
///
/// The subject
///
@@ -473,6 +673,7 @@ internal static List ComputeNestedUsage(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedUseCase))]
internal static List ComputeNestedUseCase(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -481,6 +682,12 @@ internal static List ComputeNestedUseCase(this IUsage usageSubjec
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedVerificationCase = nestedUsage->selectByKind(VerificationCaseUsage)
+ ///
+ ///
///
/// The subject
///
@@ -488,6 +695,7 @@ internal static List ComputeNestedUseCase(this IUsage usageSubjec
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedVerificationCase))]
internal static List ComputeNestedVerificationCase(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -496,6 +704,12 @@ internal static List ComputeNestedVerificationCase(this
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedView = nestedUsage->selectByKind(ViewUsage)
+ ///
+ ///
///
/// The subject
///
@@ -503,6 +717,7 @@ internal static List ComputeNestedVerificationCase(this
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedView))]
internal static List ComputeNestedView(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -511,6 +726,12 @@ internal static List ComputeNestedView(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// nestedViewpoint = nestedUsage->selectByKind(ViewpointUsage)
+ ///
+ ///
///
/// The subject
///
@@ -518,6 +739,7 @@ internal static List ComputeNestedView(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.nestedViewpoint))]
internal static List ComputeNestedViewpoint(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -533,6 +755,7 @@ internal static List ComputeNestedViewpoint(this IUsage usageSu
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.owningDefinition))]
internal static IDefinition ComputeOwningDefinition(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -548,6 +771,7 @@ internal static IDefinition ComputeOwningDefinition(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.owningUsage))]
internal static IUsage ComputeOwningUsage(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -556,6 +780,12 @@ internal static IUsage ComputeOwningUsage(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// usage = feature->selectByKind(Usage)
+ ///
+ ///
///
/// The subject
///
@@ -563,6 +793,7 @@ internal static IUsage ComputeOwningUsage(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.usage))]
internal static List ComputeUsage(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -571,6 +802,12 @@ internal static List ComputeUsage(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// variant = variantMembership.ownedVariantUsage
+ ///
+ ///
///
/// The subject
///
@@ -578,6 +815,7 @@ internal static List ComputeUsage(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.variant))]
internal static List ComputeVariant(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -586,6 +824,12 @@ internal static List ComputeVariant(this IUsage usageSubject)
///
/// Computes the derived property.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// variantMembership = ownedMembership->selectByKind(VariantMembership)
+ ///
+ ///
///
/// The subject
///
@@ -593,6 +837,7 @@ internal static List ComputeVariant(this IUsage usageSubject)
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(IUsage.variantMembership))]
internal static List ComputeVariantMembership(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -602,6 +847,16 @@ internal static List ComputeVariantMembership(this IUsage us
/// If this Usage is a variant, then its naming Feature is the referencedFeature of its
/// ownedReferenceSubsetting.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// if not owningMembership.oclIsKindOf(VariantMembership) then
+ /// self.oclAsType(Feature).namingFeature()
+ /// else if ownedReferenceSubsetting = null then null
+ /// else ownedReferenceSubsetting.referencedFeature
+ /// endif endif
+ ///
+ ///
///
/// The subject
///
@@ -609,6 +864,7 @@ internal static List ComputeVariantMembership(this IUsage us
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IUsage.NamingFeature))]
internal static IFeature ComputeRedefinedNamingFeatureOperation(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -618,6 +874,14 @@ internal static IFeature ComputeRedefinedNamingFeatureOperation(this IUsage usag
/// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the
/// ownedReferenceSubsetting.
///
+ ///
+ /// OCL2.0:
+ ///
+ /// if ownedReferenceSubsetting = null then null
+ /// else ownedReferenceSubsetting.referencedFeature.featureTarget
+ /// endif
+ ///
+ ///
///
/// The subject
///
@@ -625,6 +889,7 @@ internal static IFeature ComputeRedefinedNamingFeatureOperation(this IUsage usag
/// The expected
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(IUsage.ReferencedFeatureTarget))]
internal static IFeature ComputeReferencedFeatureTargetOperation(this IUsage usageSubject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-extend-uml-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-extend-uml-template.hbs
index 77a8b4495..83f116b38 100644
--- a/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-extend-uml-template.hbs
+++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-extend-uml-template.hbs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace thi
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
{{ #Class.WriteEnumerationNameSpacesWithOperation this}}
{{ #Class.WriteNameSpaces this POCO}}
@@ -47,6 +49,7 @@ namespace SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace thi
/// the computed result
///
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [DerivedProperty(name: nameof(I{{../this.Name}}.{{property.Name}}))]
internal static {{ Property.WriteTypeForExtendClass property }} Compute{{String.CapitalizeFirstLetter property.Name}}(this I{{../this.Name}} {{String.LowerCaseFirstLetter ../this.Name}}Subject)
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
@@ -64,6 +67,7 @@ namespace SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace thi
///
{{ #ParameterDocumentation operation }}
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
+ [Operation(name: nameof(I{{../this.Name}}.{{String.CapitalizeFirstLetter operation.Name}}))]
{{ #Operation.WriteForPOCOExtend operation }}
{
throw new NotSupportedException("Create a GitHub issue when this method is required");
diff --git a/SysML2.NET/Decorators/DerivedPropertyAttribute.cs b/SysML2.NET/Decorators/DerivedPropertyAttribute.cs
new file mode 100644
index 000000000..0a81286e2
--- /dev/null
+++ b/SysML2.NET/Decorators/DerivedPropertyAttribute.cs
@@ -0,0 +1,47 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright 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.Decorators
+{
+ using System;
+
+ ///
+ /// Attribute used to decorate a method that computes a derived property of the metamodel.
+ ///
+ [AttributeUsage(AttributeTargets.Method)]
+ public sealed class DerivedPropertyAttribute : Attribute
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// The name of the derived property on the metaclass interface.
+ ///
+ public DerivedPropertyAttribute(string name)
+ {
+ this.Name = name;
+ }
+
+ ///
+ /// Gets or sets the name of the derived property on the metaclass interface.
+ ///
+ public string Name { get; set; }
+ }
+}
diff --git a/SysML2.NET/Decorators/OperationAttribute.cs b/SysML2.NET/Decorators/OperationAttribute.cs
new file mode 100644
index 000000000..0a276b545
--- /dev/null
+++ b/SysML2.NET/Decorators/OperationAttribute.cs
@@ -0,0 +1,47 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright 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.Decorators
+{
+ using System;
+
+ ///
+ /// Attribute used to decorate a method that implements an operation of the metamodel.
+ ///
+ [AttributeUsage(AttributeTargets.Method)]
+ public sealed class OperationAttribute : Attribute
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// The name of the operation on the metaclass interface.
+ ///
+ public OperationAttribute(string name)
+ {
+ this.Name = name;
+ }
+
+ ///
+ /// Gets or sets the name of the operation on the metaclass interface.
+ ///
+ public string Name { get; set; }
+ }
+}
diff --git a/SysML2.NET/Extend/AcceptActionUsageExtensions.cs b/SysML2.NET/Extend/AcceptActionUsageExtensions.cs
index b970aaa80..3d893685a 100644
--- a/SysML2.NET/Extend/AcceptActionUsageExtensions.cs
+++ b/SysML2.NET/Extend/AcceptActionUsageExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Systems.Actions
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.Systems.Occurrences;
@@ -78,6 +80,7 @@ internal static class AcceptActionUsageExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAcceptActionUsage.payloadArgument))]
internal static IExpression ComputePayloadArgument(this IAcceptActionUsage acceptActionUsageSubject)
{
return acceptActionUsageSubject == null
@@ -102,6 +105,7 @@ internal static IExpression ComputePayloadArgument(this IAcceptActionUsage accep
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAcceptActionUsage.payloadParameter))]
internal static IReferenceUsage ComputePayloadParameter(this IAcceptActionUsage acceptActionUsageSubject)
{
if (acceptActionUsageSubject == null)
@@ -131,6 +135,7 @@ internal static IReferenceUsage ComputePayloadParameter(this IAcceptActionUsage
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAcceptActionUsage.receiverArgument))]
internal static IExpression ComputeReceiverArgument(this IAcceptActionUsage acceptActionUsageSubject)
{
return acceptActionUsageSubject == null
@@ -155,6 +160,7 @@ internal static IExpression ComputeReceiverArgument(this IAcceptActionUsage acce
///
/// The expected
///
+ [Operation(name: nameof(IAcceptActionUsage.IsTriggerAction))]
internal static bool ComputeIsTriggerActionOperation(this IAcceptActionUsage acceptActionUsageSubject)
{
return acceptActionUsageSubject == null
diff --git a/SysML2.NET/Extend/ActionDefinitionExtensions.cs b/SysML2.NET/Extend/ActionDefinitionExtensions.cs
index 096e46a58..fa19f3369 100644
--- a/SysML2.NET/Extend/ActionDefinitionExtensions.cs
+++ b/SysML2.NET/Extend/ActionDefinitionExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.Actions
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Classifiers;
@@ -76,6 +78,7 @@ internal static class ActionDefinitionExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IActionDefinition.action))]
internal static List ComputeAction(this IActionDefinition actionDefinitionSubject)
{
return actionDefinitionSubject == null
diff --git a/SysML2.NET/Extend/ActionUsageExtensions.cs b/SysML2.NET/Extend/ActionUsageExtensions.cs
index 2b2f3dc76..9d6455b0f 100644
--- a/SysML2.NET/Extend/ActionUsageExtensions.cs
+++ b/SysML2.NET/Extend/ActionUsageExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.Actions
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Core.POCO.Kernel.Behaviors;
using SysML2.NET.Core.POCO.Kernel.FeatureValues;
@@ -46,6 +48,7 @@ internal static class ActionUsageExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IActionUsage.actionDefinition))]
internal static List ComputeActionDefinition(this IActionUsage actionUsageSubject)
{
return actionUsageSubject == null
@@ -68,6 +71,7 @@ internal static List ComputeActionDefinition(this IActionUsage action
///
/// The expected collection of
///
+ [Operation(name: nameof(IActionUsage.InputParameters))]
internal static List ComputeInputParametersOperation(this IActionUsage actionUsageSubject)
{
return actionUsageSubject == null
@@ -96,6 +100,7 @@ internal static List ComputeInputParametersOperation(this IActionUsage
///
/// The expected
///
+ [Operation(name: nameof(IActionUsage.InputParameter))]
internal static IFeature ComputeInputParameterOperation(this IActionUsage actionUsageSubject, int i)
{
if (actionUsageSubject == null)
@@ -137,6 +142,7 @@ internal static IFeature ComputeInputParameterOperation(this IActionUsage action
///
/// The expected
///
+ [Operation(name: nameof(IActionUsage.Argument))]
internal static IExpression ComputeArgumentOperation(this IActionUsage actionUsageSubject, int i)
{
return actionUsageSubject == null
@@ -166,6 +172,7 @@ internal static IExpression ComputeArgumentOperation(this IActionUsage actionUsa
///
/// The expected
///
+ [Operation(name: nameof(IActionUsage.IsSubactionUsage))]
internal static bool ComputeIsSubactionUsageOperation(this IActionUsage actionUsageSubject)
{
if (actionUsageSubject == null)
diff --git a/SysML2.NET/Extend/ActorMembershipExtensions.cs b/SysML2.NET/Extend/ActorMembershipExtensions.cs
index 8ab7bbac2..d569430d2 100644
--- a/SysML2.NET/Extend/ActorMembershipExtensions.cs
+++ b/SysML2.NET/Extend/ActorMembershipExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Features;
@@ -49,6 +51,7 @@ internal static class ActorMembershipExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IActorMembership.ownedActorParameter))]
internal static IPartUsage ComputeOwnedActorParameter(this IActorMembership actorMembershipSubject)
{
if (actorMembershipSubject == null)
diff --git a/SysML2.NET/Extend/AllocationDefinitionExtensions.cs b/SysML2.NET/Extend/AllocationDefinitionExtensions.cs
index 84a40cbf1..eafd24263 100644
--- a/SysML2.NET/Extend/AllocationDefinitionExtensions.cs
+++ b/SysML2.NET/Extend/AllocationDefinitionExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.Allocations
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Classifiers;
@@ -76,6 +78,7 @@ internal static class AllocationDefinitionExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAllocationDefinition.allocation))]
internal static List ComputeAllocation(this IAllocationDefinition allocationDefinitionSubject)
{
return allocationDefinitionSubject == null
diff --git a/SysML2.NET/Extend/AllocationUsageExtensions.cs b/SysML2.NET/Extend/AllocationUsageExtensions.cs
index adb266bd7..d9e888314 100644
--- a/SysML2.NET/Extend/AllocationUsageExtensions.cs
+++ b/SysML2.NET/Extend/AllocationUsageExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.Allocations
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.Systems.Occurrences;
@@ -74,6 +76,7 @@ internal static class AllocationUsageExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAllocationUsage.allocationDefinition))]
internal static List ComputeAllocationDefinition(this IAllocationUsage allocationUsageSubject)
{
return allocationUsageSubject == null
diff --git a/SysML2.NET/Extend/AnalysisCaseDefinitionExtensions.cs b/SysML2.NET/Extend/AnalysisCaseDefinitionExtensions.cs
index 95d6ec42e..d4d4e3c31 100644
--- a/SysML2.NET/Extend/AnalysisCaseDefinitionExtensions.cs
+++ b/SysML2.NET/Extend/AnalysisCaseDefinitionExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.AnalysisCases
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Classifiers;
@@ -83,6 +85,7 @@ internal static class AnalysisCaseDefinitionExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAnalysisCaseDefinition.resultExpression))]
internal static IExpression ComputeResultExpression(this IAnalysisCaseDefinition analysisCaseDefinitionSubject)
{
if (analysisCaseDefinitionSubject == null)
diff --git a/SysML2.NET/Extend/AnalysisCaseUsageExtensions.cs b/SysML2.NET/Extend/AnalysisCaseUsageExtensions.cs
index fd80fab58..7980a9a79 100644
--- a/SysML2.NET/Extend/AnalysisCaseUsageExtensions.cs
+++ b/SysML2.NET/Extend/AnalysisCaseUsageExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.AnalysisCases
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.Systems.Occurrences;
@@ -85,6 +87,7 @@ internal static class AnalysisCaseUsageExtensions
/// (upper-bound violation against the derived
/// [0..1] property).
///
+ [DerivedProperty(name: nameof(IAnalysisCaseUsage.analysisCaseDefinition))]
internal static IAnalysisCaseDefinition ComputeAnalysisCaseDefinition(this IAnalysisCaseUsage analysisCaseUsageSubject)
{
return analysisCaseUsageSubject == null
@@ -113,6 +116,7 @@ internal static IAnalysisCaseDefinition ComputeAnalysisCaseDefinition(this IAnal
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAnalysisCaseUsage.resultExpression))]
internal static IExpression ComputeResultExpression(this IAnalysisCaseUsage analysisCaseUsageSubject)
{
if (analysisCaseUsageSubject == null)
diff --git a/SysML2.NET/Extend/AnnotatingElementExtensions.cs b/SysML2.NET/Extend/AnnotatingElementExtensions.cs
index 226b6a77f..6068173d8 100644
--- a/SysML2.NET/Extend/AnnotatingElementExtensions.cs
+++ b/SysML2.NET/Extend/AnnotatingElementExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Root.Annotations
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Root.Elements;
///
@@ -49,6 +51,7 @@ internal static class AnnotatingElementExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAnnotatingElement.annotatedElement))]
internal static List ComputeAnnotatedElement(this IAnnotatingElement annotatingElementSubject)
{
if (annotatingElementSubject == null)
@@ -87,6 +90,7 @@ internal static List ComputeAnnotatedElement(this IAnnotatingElement a
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAnnotatingElement.annotation))]
internal static List ComputeAnnotation(this IAnnotatingElement annotatingElementSubject)
{
if (annotatingElementSubject == null)
@@ -122,6 +126,7 @@ internal static List ComputeAnnotation(this IAnnotatingElement anno
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAnnotatingElement.ownedAnnotatingRelationship))]
internal static List ComputeOwnedAnnotatingRelationship(this IAnnotatingElement annotatingElementSubject)
{
if (annotatingElementSubject == null)
@@ -152,6 +157,7 @@ internal static List ComputeOwnedAnnotatingRelationship(this IAnnot
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAnnotatingElement.owningAnnotatingRelationship))]
internal static IAnnotation ComputeOwningAnnotatingRelationship(this IAnnotatingElement annotatingElementSubject)
{
return annotatingElementSubject == null
diff --git a/SysML2.NET/Extend/AnnotationExtensions.cs b/SysML2.NET/Extend/AnnotationExtensions.cs
index dddecfe36..ddc27c7cf 100644
--- a/SysML2.NET/Extend/AnnotationExtensions.cs
+++ b/SysML2.NET/Extend/AnnotationExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Root.Annotations
using System;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Root.Elements;
///
@@ -49,6 +51,7 @@ internal static class AnnotationExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAnnotation.annotatingElement))]
internal static IAnnotatingElement ComputeAnnotatingElement(this IAnnotation annotationSubject)
{
return annotationSubject == null
@@ -76,6 +79,7 @@ internal static IAnnotatingElement ComputeAnnotatingElement(this IAnnotation ann
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAnnotation.ownedAnnotatingElement))]
internal static IAnnotatingElement ComputeOwnedAnnotatingElement(this IAnnotation annotationSubject)
{
return annotationSubject == null
@@ -92,6 +96,7 @@ internal static IAnnotatingElement ComputeOwnedAnnotatingElement(this IAnnotatio
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAnnotation.owningAnnotatedElement))]
internal static IElement ComputeOwningAnnotatedElement(this IAnnotation annotationSubject)
{
if (annotationSubject == null)
@@ -116,6 +121,7 @@ internal static IElement ComputeOwningAnnotatedElement(this IAnnotation annotati
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAnnotation.owningAnnotatingElement))]
internal static IAnnotatingElement ComputeOwningAnnotatingElement(this IAnnotation annotationSubject)
{
return annotationSubject == null
diff --git a/SysML2.NET/Extend/AssertConstraintUsageExtensions.cs b/SysML2.NET/Extend/AssertConstraintUsageExtensions.cs
index 19933aa5c..18c1104cc 100644
--- a/SysML2.NET/Extend/AssertConstraintUsageExtensions.cs
+++ b/SysML2.NET/Extend/AssertConstraintUsageExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.Systems.Occurrences;
@@ -83,6 +85,7 @@ internal static class AssertConstraintUsageExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAssertConstraintUsage.assertedConstraint))]
internal static IConstraintUsage ComputeAssertedConstraint(this IAssertConstraintUsage assertConstraintUsageSubject)
{
if (assertConstraintUsageSubject == null)
diff --git a/SysML2.NET/Extend/AssignmentActionUsageExtensions.cs b/SysML2.NET/Extend/AssignmentActionUsageExtensions.cs
index b8bd7fa9e..c34c0e5f2 100644
--- a/SysML2.NET/Extend/AssignmentActionUsageExtensions.cs
+++ b/SysML2.NET/Extend/AssignmentActionUsageExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Systems.Actions
using System;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Core.POCO.Core.Types;
using SysML2.NET.Core.POCO.Kernel.Functions;
@@ -56,6 +58,7 @@ internal static class AssignmentActionUsageExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAssignmentActionUsage.referent))]
internal static IFeature ComputeReferent(this IAssignmentActionUsage assignmentActionUsageSubject)
{
if (assignmentActionUsageSubject == null)
@@ -84,6 +87,7 @@ internal static IFeature ComputeReferent(this IAssignmentActionUsage assignmentA
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAssignmentActionUsage.targetArgument))]
internal static IExpression ComputeTargetArgument(this IAssignmentActionUsage assignmentActionUsageSubject)
{
return assignmentActionUsageSubject == null
@@ -106,6 +110,7 @@ internal static IExpression ComputeTargetArgument(this IAssignmentActionUsage as
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAssignmentActionUsage.valueExpression))]
internal static IExpression ComputeValueExpression(this IAssignmentActionUsage assignmentActionUsageSubject)
{
return assignmentActionUsageSubject == null
diff --git a/SysML2.NET/Extend/AssociationExtensions.cs b/SysML2.NET/Extend/AssociationExtensions.cs
index f67b18c41..515e080ba 100644
--- a/SysML2.NET/Extend/AssociationExtensions.cs
+++ b/SysML2.NET/Extend/AssociationExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Core.POCO.Core.Types;
@@ -42,6 +44,7 @@ internal static class AssociationExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAssociation.associationEnd))]
internal static List ComputeAssociationEnd(this IAssociation associationSubject)
{
return associationSubject == null
@@ -64,6 +67,7 @@ internal static List ComputeAssociationEnd(this IAssociation associati
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAssociation.relatedType))]
internal static List ComputeRelatedType(this IAssociation associationSubject)
{
return associationSubject == null
@@ -88,6 +92,7 @@ internal static List ComputeRelatedType(this IAssociation associationSubj
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAssociation.sourceType))]
internal static IType ComputeSourceType(this IAssociation associationSubject)
{
if (associationSubject == null)
@@ -121,6 +126,7 @@ internal static IType ComputeSourceType(this IAssociation associationSubject)
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAssociation.targetType))]
internal static List ComputeTargetType(this IAssociation associationSubject)
{
if (associationSubject == null)
diff --git a/SysML2.NET/Extend/AttributeUsageExtensions.cs b/SysML2.NET/Extend/AttributeUsageExtensions.cs
index cd9742a22..68d99de7f 100644
--- a/SysML2.NET/Extend/AttributeUsageExtensions.cs
+++ b/SysML2.NET/Extend/AttributeUsageExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.Attributes
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Classifiers;
@@ -78,6 +80,7 @@ internal static class AttributeUsageExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAttributeUsage.attributeDefinition))]
internal static List ComputeAttributeDefinition(this IAttributeUsage attributeUsageSubject)
{
return attributeUsageSubject == null
@@ -94,6 +97,7 @@ internal static List ComputeAttributeDefinition(this IAttributeUsage
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IAttributeUsage.isReference))]
internal static bool ComputeIsReference(this IAttributeUsage attributeUsageSubject)
{
return attributeUsageSubject == null
diff --git a/SysML2.NET/Extend/BehaviorExtensions.cs b/SysML2.NET/Extend/BehaviorExtensions.cs
index 89fa59689..399e557f9 100644
--- a/SysML2.NET/Extend/BehaviorExtensions.cs
+++ b/SysML2.NET/Extend/BehaviorExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Behaviors
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Core.Features;
///
@@ -41,6 +43,7 @@ internal static class BehaviorExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IBehavior.parameter))]
internal static List ComputeParameter(this IBehavior behaviorSubject)
{
return behaviorSubject == null
@@ -63,6 +66,7 @@ internal static List ComputeParameter(this IBehavior behaviorSubject)
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IBehavior.step))]
internal static List ComputeStep(this IBehavior behaviorSubject)
{
return behaviorSubject == null
diff --git a/SysML2.NET/Extend/BooleanExpressionExtensions.cs b/SysML2.NET/Extend/BooleanExpressionExtensions.cs
index 4d002a88c..e4cdd2cb8 100644
--- a/SysML2.NET/Extend/BooleanExpressionExtensions.cs
+++ b/SysML2.NET/Extend/BooleanExpressionExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions
using System;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Core.Types;
using SysML2.NET.Exceptions;
using SysML2.NET.Extensions;
@@ -50,6 +52,7 @@ internal static class BooleanExpressionExtensions
/// Thrown when more than one on the subject is an
/// (upper-bound violation against the derived [0..1] property).
///
+ [DerivedProperty(name: nameof(IBooleanExpression.predicate))]
internal static IPredicate ComputePredicate(this IBooleanExpression booleanExpressionSubject)
{
return booleanExpressionSubject == null
diff --git a/SysML2.NET/Extend/CalculationDefinitionExtensions.cs b/SysML2.NET/Extend/CalculationDefinitionExtensions.cs
index 7e30f37d2..7e968d27b 100644
--- a/SysML2.NET/Extend/CalculationDefinitionExtensions.cs
+++ b/SysML2.NET/Extend/CalculationDefinitionExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.Calculations
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Classifiers;
@@ -77,6 +79,7 @@ internal static class CalculationDefinitionExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(ICalculationDefinition.calculation))]
internal static List ComputeCalculation(this ICalculationDefinition calculationDefinitionSubject)
{
return calculationDefinitionSubject == null
diff --git a/SysML2.NET/Extend/CalculationUsageExtensions.cs b/SysML2.NET/Extend/CalculationUsageExtensions.cs
index 4b9aa63b5..6d720eaf8 100644
--- a/SysML2.NET/Extend/CalculationUsageExtensions.cs
+++ b/SysML2.NET/Extend/CalculationUsageExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.Calculations
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.Systems.Occurrences;
@@ -84,6 +86,7 @@ internal static class CalculationUsageExtensions
/// Thrown when more than one targets an
/// (upper-bound violation against the derived [0..1] property).
///
+ [DerivedProperty(name: nameof(ICalculationUsage.calculationDefinition))]
internal static IFunction ComputeCalculationDefinition(this ICalculationUsage calculationUsageSubject)
{
return calculationUsageSubject == null
@@ -109,6 +112,7 @@ internal static IFunction ComputeCalculationDefinition(this ICalculationUsage ca
///
/// The expected
///
+ [Operation(name: nameof(ICalculationUsage.ModelLevelEvaluable))]
internal static bool ComputeRedefinedModelLevelEvaluableOperation(this ICalculationUsage calculationUsageSubject, List visited)
{
if (calculationUsageSubject == null)
diff --git a/SysML2.NET/Extend/CaseDefinitionExtensions.cs b/SysML2.NET/Extend/CaseDefinitionExtensions.cs
index e885e273b..90c7404a5 100644
--- a/SysML2.NET/Extend/CaseDefinitionExtensions.cs
+++ b/SysML2.NET/Extend/CaseDefinitionExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.Cases
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Classifiers;
@@ -79,6 +81,7 @@ internal static class CaseDefinitionExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(ICaseDefinition.actorParameter))]
internal static List ComputeActorParameter(this ICaseDefinition caseDefinitionSubject)
{
return caseDefinitionSubject == null
@@ -108,6 +111,7 @@ internal static List ComputeActorParameter(this ICaseDefinition case
///
/// the computed result
///
+ [DerivedProperty(name: nameof(ICaseDefinition.objectiveRequirement))]
internal static IRequirementUsage ComputeObjectiveRequirement(this ICaseDefinition caseDefinitionSubject)
{
if (caseDefinitionSubject == null)
@@ -141,6 +145,7 @@ internal static IRequirementUsage ComputeObjectiveRequirement(this ICaseDefiniti
///
/// the computed result
///
+ [DerivedProperty(name: nameof(ICaseDefinition.subjectParameter))]
internal static IUsage ComputeSubjectParameter(this ICaseDefinition caseDefinitionSubject)
{
if (caseDefinitionSubject == null)
diff --git a/SysML2.NET/Extend/CaseUsageExtensions.cs b/SysML2.NET/Extend/CaseUsageExtensions.cs
index 19c26da5b..c025a19b7 100644
--- a/SysML2.NET/Extend/CaseUsageExtensions.cs
+++ b/SysML2.NET/Extend/CaseUsageExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.Cases
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.Systems.Occurrences;
@@ -83,6 +85,7 @@ internal static class CaseUsageExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(ICaseUsage.actorParameter))]
internal static List ComputeActorParameter(this ICaseUsage caseUsageSubject)
{
return caseUsageSubject == null
@@ -109,6 +112,7 @@ internal static List ComputeActorParameter(this ICaseUsage caseUsage
/// (upper-bound violation against the derived
/// [0..1] property).
///
+ [DerivedProperty(name: nameof(ICaseUsage.caseDefinition))]
internal static ICaseDefinition ComputeCaseDefinition(this ICaseUsage caseUsageSubject)
{
return caseUsageSubject == null
@@ -138,6 +142,7 @@ internal static ICaseDefinition ComputeCaseDefinition(this ICaseUsage caseUsageS
///
/// the computed result
///
+ [DerivedProperty(name: nameof(ICaseUsage.objectiveRequirement))]
internal static IRequirementUsage ComputeObjectiveRequirement(this ICaseUsage caseUsageSubject)
{
if (caseUsageSubject == null)
@@ -171,6 +176,7 @@ internal static IRequirementUsage ComputeObjectiveRequirement(this ICaseUsage ca
///
/// the computed result
///
+ [DerivedProperty(name: nameof(ICaseUsage.subjectParameter))]
internal static IUsage ComputeSubjectParameter(this ICaseUsage caseUsageSubject)
{
if (caseUsageSubject == null)
diff --git a/SysML2.NET/Extend/ClassifierExtensions.cs b/SysML2.NET/Extend/ClassifierExtensions.cs
index 0ab4c5934..369f6ad90 100644
--- a/SysML2.NET/Extend/ClassifierExtensions.cs
+++ b/SysML2.NET/Extend/ClassifierExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Core.Classifiers
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
///
/// The class provides extensions methods for
/// the interface
@@ -46,6 +48,7 @@ internal static class ClassifierExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IClassifier.ownedSubclassification))]
internal static List ComputeOwnedSubclassification(this IClassifier classifierSubject)
{
return classifierSubject == null
diff --git a/SysML2.NET/Extend/ConcernUsageExtensions.cs b/SysML2.NET/Extend/ConcernUsageExtensions.cs
index 1cd0cd6be..155b0f990 100644
--- a/SysML2.NET/Extend/ConcernUsageExtensions.cs
+++ b/SysML2.NET/Extend/ConcernUsageExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements
using System;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Extensions;
@@ -41,6 +43,7 @@ internal static class ConcernUsageExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IConcernUsage.concernDefinition))]
internal static IConcernDefinition ComputeConcernDefinition(this IConcernUsage concernUsageSubject)
{
return concernUsageSubject == null
diff --git a/SysML2.NET/Extend/ConjugatedPortDefinitionExtensions.cs b/SysML2.NET/Extend/ConjugatedPortDefinitionExtensions.cs
index 1a76832ac..e716781db 100644
--- a/SysML2.NET/Extend/ConjugatedPortDefinitionExtensions.cs
+++ b/SysML2.NET/Extend/ConjugatedPortDefinitionExtensions.cs
@@ -22,6 +22,8 @@ namespace SysML2.NET.Core.POCO.Systems.Ports
{
using System;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Exceptions;
using SysML2.NET.Extensions;
@@ -40,6 +42,7 @@ internal static class ConjugatedPortDefinitionExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IConjugatedPortDefinition.originalPortDefinition))]
internal static IPortDefinition ComputeOriginalPortDefinition(this IConjugatedPortDefinition conjugatedPortDefinitionSubject)
{
if (conjugatedPortDefinitionSubject == null)
@@ -61,6 +64,7 @@ internal static IPortDefinition ComputeOriginalPortDefinition(this IConjugatedPo
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IConjugatedPortDefinition.ownedPortConjugator))]
internal static IPortConjugation ComputeOwnedPortConjugator(this IConjugatedPortDefinition conjugatedPortDefinitionSubject)
{
if (conjugatedPortDefinitionSubject == null)
@@ -91,6 +95,7 @@ internal static IPortConjugation ComputeOwnedPortConjugator(this IConjugatedPort
///
/// The expected
///
+ [Operation(name: nameof(IConjugatedPortDefinition.EffectiveName))]
internal static string ComputeRedefinedEffectiveNameOperation(this IConjugatedPortDefinition conjugatedPortDefinitionSubject)
{
if (conjugatedPortDefinitionSubject == null)
diff --git a/SysML2.NET/Extend/ConjugatedPortTypingExtensions.cs b/SysML2.NET/Extend/ConjugatedPortTypingExtensions.cs
index af5aff1b7..d2d5ed7e9 100644
--- a/SysML2.NET/Extend/ConjugatedPortTypingExtensions.cs
+++ b/SysML2.NET/Extend/ConjugatedPortTypingExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Systems.Ports
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Core.POCO.Core.Types;
using SysML2.NET.Core.POCO.Root.Annotations;
@@ -50,6 +52,7 @@ internal static class ConjugatedPortTypingExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IConjugatedPortTyping.portDefinition))]
internal static IPortDefinition ComputePortDefinition(this IConjugatedPortTyping conjugatedPortTypingSubject)
{
return conjugatedPortTypingSubject == null
diff --git a/SysML2.NET/Extend/ConjugationExtensions.cs b/SysML2.NET/Extend/ConjugationExtensions.cs
index cdae72cee..e906b0c3a 100644
--- a/SysML2.NET/Extend/ConjugationExtensions.cs
+++ b/SysML2.NET/Extend/ConjugationExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Core.Types
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Root.Annotations;
using SysML2.NET.Core.POCO.Root.Elements;
using SysML2.NET.Core.POCO.Root.Namespaces;
@@ -42,6 +44,7 @@ internal static class ConjugationExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IConjugation.owningType))]
internal static IType ComputeOwningType(this IConjugation conjugationSubject)
{
return conjugationSubject == null
diff --git a/SysML2.NET/Extend/ConnectionDefinitionExtensions.cs b/SysML2.NET/Extend/ConnectionDefinitionExtensions.cs
index 5a4b17cfd..9a5f64461 100644
--- a/SysML2.NET/Extend/ConnectionDefinitionExtensions.cs
+++ b/SysML2.NET/Extend/ConnectionDefinitionExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.Connections
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.POCO.Core.Classifiers;
@@ -70,6 +72,7 @@ internal static class ConnectionDefinitionExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IConnectionDefinition.connectionEnd))]
internal static List ComputeConnectionEnd(this IConnectionDefinition connectionDefinitionSubject)
{
return connectionDefinitionSubject == null
diff --git a/SysML2.NET/Extend/ConnectionUsageExtensions.cs b/SysML2.NET/Extend/ConnectionUsageExtensions.cs
index 1f59bed0b..74cca8b18 100644
--- a/SysML2.NET/Extend/ConnectionUsageExtensions.cs
+++ b/SysML2.NET/Extend/ConnectionUsageExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.Connections
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.Systems.Occurrences;
@@ -74,6 +76,7 @@ internal static class ConnectionUsageExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IConnectionUsage.connectionDefinition))]
internal static List ComputeConnectionDefinition(this IConnectionUsage connectionUsageSubject)
{
return connectionUsageSubject == null
diff --git a/SysML2.NET/Extend/ConnectorExtensions.cs b/SysML2.NET/Extend/ConnectorExtensions.cs
index 9d563278e..e1ab403f1 100644
--- a/SysML2.NET/Extend/ConnectorExtensions.cs
+++ b/SysML2.NET/Extend/ConnectorExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Connectors
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Core.Features;
using SysML2.NET.Core.POCO.Core.Types;
using SysML2.NET.Core.POCO.Kernel.Associations;
@@ -43,6 +45,7 @@ internal static class ConnectorExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IConnector.association))]
internal static List ComputeAssociation(this IConnector connectorSubject)
{
return connectorSubject == null
@@ -59,6 +62,7 @@ internal static List ComputeAssociation(this IConnector connectorS
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IConnector.connectorEnd))]
internal static List ComputeConnectorEnd(this IConnector connectorSubject)
{
return connectorSubject == null
@@ -92,6 +96,7 @@ internal static List ComputeConnectorEnd(this IConnector connectorSubj
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IConnector.defaultFeaturingType))]
internal static IType ComputeDefaultFeaturingType(this IConnector connectorSubject)
{
if (connectorSubject == null)
@@ -142,6 +147,7 @@ internal static IType ComputeDefaultFeaturingType(this IConnector connectorSubje
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IConnector.relatedFeature))]
internal static List ComputeRelatedFeature(this IConnector connectorSubject)
{
return connectorSubject == null
@@ -170,6 +176,7 @@ internal static List ComputeRelatedFeature(this IConnector connectorSu
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IConnector.sourceFeature))]
internal static IFeature ComputeSourceFeature(this IConnector connectorSubject)
{
if (connectorSubject == null)
@@ -203,6 +210,7 @@ internal static IFeature ComputeSourceFeature(this IConnector connectorSubject)
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IConnector.targetFeature))]
internal static List ComputeTargetFeature(this IConnector connectorSubject)
{
if (connectorSubject == null)
diff --git a/SysML2.NET/Extend/ConstraintUsageExtensions.cs b/SysML2.NET/Extend/ConstraintUsageExtensions.cs
index 71f49cc2f..1086599c4 100644
--- a/SysML2.NET/Extend/ConstraintUsageExtensions.cs
+++ b/SysML2.NET/Extend/ConstraintUsageExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.Systems.Occurrences;
@@ -84,6 +86,7 @@ internal static class ConstraintUsageExtensions
/// Thrown when more than one targets an
/// (upper-bound violation against the derived [0..1] property).
///
+ [DerivedProperty(name: nameof(IConstraintUsage.constraintDefinition))]
internal static IPredicate ComputeConstraintDefinition(this IConstraintUsage constraintUsageSubject)
{
return constraintUsageSubject == null
@@ -114,6 +117,7 @@ internal static IPredicate ComputeConstraintDefinition(this IConstraintUsage con
///
/// The expected
///
+ [Operation(name: nameof(IConstraintUsage.NamingFeature))]
internal static IFeature ComputeRedefinedNamingFeatureOperation(this IConstraintUsage constraintUsageSubject)
{
if (constraintUsageSubject == null)
@@ -150,6 +154,7 @@ internal static IFeature ComputeRedefinedNamingFeatureOperation(this IConstraint
///
/// The expected
///
+ [Operation(name: nameof(IConstraintUsage.ModelLevelEvaluable))]
internal static bool ComputeRedefinedModelLevelEvaluableOperation(this IConstraintUsage constraintUsageSubject, List visited)
{
if (constraintUsageSubject == null)
diff --git a/SysML2.NET/Extend/ConstructorExpressionExtensions.cs b/SysML2.NET/Extend/ConstructorExpressionExtensions.cs
index 74ef8a3f5..c09d4fb58 100644
--- a/SysML2.NET/Extend/ConstructorExpressionExtensions.cs
+++ b/SysML2.NET/Extend/ConstructorExpressionExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Core.Features;
///
@@ -51,6 +53,7 @@ internal static class ConstructorExpressionExtensions
///
/// The expected
///
+ [Operation(name: nameof(IConstructorExpression.ModelLevelEvaluable))]
internal static bool ComputeRedefinedModelLevelEvaluableOperation(this IConstructorExpression constructorExpressionSubject, List visited)
{
if (constructorExpressionSubject == null)
diff --git a/SysML2.NET/Extend/ControlNodeExtensions.cs b/SysML2.NET/Extend/ControlNodeExtensions.cs
index 82604e14e..9951d7546 100644
--- a/SysML2.NET/Extend/ControlNodeExtensions.cs
+++ b/SysML2.NET/Extend/ControlNodeExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.Actions
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.Core.Types;
using SysML2.NET.Core.Root.Namespaces;
using SysML2.NET.Core.Systems.Occurrences;
@@ -97,6 +99,7 @@ internal static class ControlNodeExtensions
///
/// The expected
///
+ [Operation(name: nameof(IControlNode.MultiplicityHasBounds))]
internal static bool ComputeMultiplicityHasBoundsOperation(this IControlNode controlNodeSubject, IMultiplicity mult, int lower, string upper)
{
if (controlNodeSubject == null)
diff --git a/SysML2.NET/Extend/CrossSubsettingExtensions.cs b/SysML2.NET/Extend/CrossSubsettingExtensions.cs
index 5c101ba30..9dc806df7 100644
--- a/SysML2.NET/Extend/CrossSubsettingExtensions.cs
+++ b/SysML2.NET/Extend/CrossSubsettingExtensions.cs
@@ -23,6 +23,8 @@ namespace SysML2.NET.Core.POCO.Core.Features
using System;
using System.Collections.Generic;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Core.Types;
using SysML2.NET.Core.POCO.Root.Annotations;
using SysML2.NET.Core.POCO.Root.Elements;
@@ -43,6 +45,7 @@ internal static class CrossSubsettingExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(ICrossSubsetting.crossingFeature))]
internal static IFeature ComputeCrossingFeature(this ICrossSubsetting crossSubsettingSubject)
{
return crossSubsettingSubject == null
diff --git a/SysML2.NET/Extend/DefinitionExtensions.cs b/SysML2.NET/Extend/DefinitionExtensions.cs
index d20a80ab8..efaf49322 100644
--- a/SysML2.NET/Extend/DefinitionExtensions.cs
+++ b/SysML2.NET/Extend/DefinitionExtensions.cs
@@ -24,6 +24,8 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage
using System.Collections.Generic;
using System.Linq;
+ using SysML2.NET.Decorators;
+
using SysML2.NET.Core.POCO.Systems.Actions;
using SysML2.NET.Core.POCO.Systems.Allocations;
using SysML2.NET.Core.POCO.Systems.AnalysisCases;
@@ -67,6 +69,7 @@ internal static class DefinitionExtensions
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IDefinition.directedUsage))]
internal static List ComputeDirectedUsage(this IDefinition definitionSubject)
{
return definitionSubject == null
@@ -89,6 +92,7 @@ internal static List ComputeDirectedUsage(this IDefinition definitionSub
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IDefinition.ownedAction))]
internal static List ComputeOwnedAction(this IDefinition definitionSubject)
{
return definitionSubject == null
@@ -111,6 +115,7 @@ internal static List ComputeOwnedAction(this IDefinition definitio
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IDefinition.ownedAllocation))]
internal static List ComputeOwnedAllocation(this IDefinition definitionSubject)
{
return definitionSubject == null
@@ -133,6 +138,7 @@ internal static List ComputeOwnedAllocation(this IDefinition d
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IDefinition.ownedAnalysisCase))]
internal static List ComputeOwnedAnalysisCase(this IDefinition definitionSubject)
{
return definitionSubject == null
@@ -155,6 +161,7 @@ internal static List ComputeOwnedAnalysisCase(this IDefiniti
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IDefinition.ownedAttribute))]
internal static List ComputeOwnedAttribute(this IDefinition definitionSubject)
{
return definitionSubject == null
@@ -177,6 +184,7 @@ internal static List ComputeOwnedAttribute(this IDefinition def
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IDefinition.ownedCalculation))]
internal static List ComputeOwnedCalculation(this IDefinition definitionSubject)
{
return definitionSubject == null
@@ -199,6 +207,7 @@ internal static List ComputeOwnedCalculation(this IDefinition
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IDefinition.ownedCase))]
internal static List ComputeOwnedCase(this IDefinition definitionSubject)
{
return definitionSubject == null
@@ -221,6 +230,7 @@ internal static List ComputeOwnedCase(this IDefinition definitionSub
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IDefinition.ownedConcern))]
internal static List ComputeOwnedConcern(this IDefinition definitionSubject)
{
return definitionSubject == null
@@ -243,6 +253,7 @@ internal static List ComputeOwnedConcern(this IDefinition definit
///
/// the computed result
///
+ [DerivedProperty(name: nameof(IDefinition.ownedConnection))]
internal static List ComputeOwnedConnection(this IDefinition definitionSubject)
{
return definitionSubject == null
@@ -265,6 +276,7 @@ internal static List