Feature SysML
- class Feature
Implementation of
Featuredefined in the KerML specification.Specification:
A
Featureis aTypethat classifies relations between multiple things (in the universe). The domain of the relation is the intersection of thefeaturing_typesof theFeature. (The domain of aFeaturewith nofeaturing_typesis implicitly the most generalTypeBase::Anythingfrom the Kernel Semantic Library.) The co-domain of the relation is the intersection of thetypesof theFeature.In the simplest cases, the
featuring_typesandtypesareClassifiersand theFeaturerelates two things, one from the domain and one from the range. Examples include cars paired with wheels, people paired with other people, and cars paired with numbers representing the car length.Since
FeaturesareTypes, theirfeaturing_typesandtypescan beFeatures. In this case, theFeatureeffectively classifies relations between relations, which can be interpreted as the sequence of things related by the domainFeatureconcatenated with the sequence of things related by the co-domainFeature.The values of a
Featurefor a given instance of its domain are all the instances of its co-domain that are related to that domain instance by theFeature. The values of aFeaturewithchaining_featuresare the same as values of the lastFeaturein the chain, which can be found by starting with values of the firstFeature, then using those values as domain instances to obtain values of the secondFeature, and so on, to values of the lastFeature.For language description, see section 7.3.4 of the KerML specification. For more details on the model, see section 8.3.3.3.4 of the KerML specification.
Children
Members defined in
Feature(45 members)
R
RThe
last_chaining_featureif one exists, otherwise thisFeature.
RSysMLImplementation of
chaining_featuredefined in the KerML specification.
RSysMLImplementation of
cross_featuredefined in the KerML specification.
RWSysMLImplementation of
directiondefined in the KerML specification.
RSysMLImplementation of
end_owning_typedefined in the KerML specification.
RReturns the direction this
Featurehas been declared with in the textual syntax.
RSysMLImplementation of
feature_targetdefined in the KerML specification.
RThe
FeatureValueowned by thisFeatureif any.
RThe feature value
Expressionof thisFeatureif any.
RSyside specific accessor for manipulating
feature_value.
RSysMLImplementation of
featuring_typedefined in the KerML specification.
RThe related
Featurerelated by the firstowned_feature_chainingif any.
RWSysMLImplementation of
is_compositedefined in the KerML specification.
RReturns
Trueif thisFeaturehas been declaredcompositein the textual syntax.
RWSysMLImplementation of
is_constantdefined in the KerML specification.
RReturns
Trueif thisFeaturehas been declaredconstantin the textual syntax.
RWSysMLImplementation of
is_deriveddefined in the KerML specification.
RWSysMLImplementation of
is_enddefined in the KerML specification.
RReturns
Trueif thisFeaturehas been declaredendin the textual syntax.
RW
RWSysMLImplementation of
is_ordereddefined in the KerML specification.
RWSysMLImplementation of
is_portiondefined in the KerML specification.
RWAlias for is_constant.
RWSysMLImplementation of
is_uniquedefined in the KerML specification.
RWSysMLImplementation of
is_variabledefined in the KerML specification.
RReturns
Trueif thisFeaturehas been declaredvariablein the textual syntax.
RThe related
Featurerelated by the lastowned_feature_chainingif any.
RThe member
Featurethat is declared before any prefixes in the textual syntax.
RSyside specific accessor for either owned crossing_feature or crossing_multiplicity. This is the member
Featurethat is declared before any prefixes in the textual syntax.
RSysMLImplementation of
owned_cross_subsettingdefined in the KerML specification.
RSysMLImplementation of
owned_feature_chainingdefined in the KerML specification.
RSysMLImplementation of
owned_feature_invertingdefined in the KerML specification.
RSysMLImplementation of
owned_redefinitiondefined in the KerML specification.
RSysMLImplementation of
owned_reference_subsettingdefined in the KerML specification.
RSysMLImplementation of
owned_subsettingdefined in the KerML specification.
RSysMLImplementation of
owned_type_featuringdefined in the KerML specification.
RSysMLImplementation of
owned_typingdefined in the KerML specification.
RSysMLImplementation of
owning_feature_membershipdefined in the KerML specification.
RSysMLImplementation of
owning_typedefined in the KerML specification.
RReturns the
FeaturethisFeaturereferences throughReferenceSubsettingif any.
RReturns the
feature_targetofreferenced_feature, i.e.referenced_feature.feature_target.
RSysMLImplementation of
typedefined in the KerML specification.
Find the owned cross feature by potentially checking children. This is needed for spec that defined owned cross feature as the first member feature that is not a MetadataFeature or Multiplicity of an end feature. Since SysML does not allow member features (member keyword in KerML), this is equivalent to owned_cross_feature in SysML.
Non-raising variant of
is_variablesetter that returnsFalseonUsageswithout modifyingis_variable.Members inherited from
Type(37 members)
RThe owned multiplicity that is declared before the children block in the textual syntax.
RSyside specific accessor for manipulating
declared_multiplicity.
RSysMLImplementation of
differencing_typedefined in the KerML specification.
RSysMLImplementation of
directed_featuredefined in the KerML specification.
RThe types that related to this
Typethroughowned_disjoinings.
RSysMLImplementation of
end_featuredefined in the KerML specification.
RSysMLImplementation of
feature_membershipdefined in the KerML specification.
RSysMLImplementation of
featuredefined in the KerML specification.
RThe specializations and conjugations owned by this
Type.
RSysMLImplementation of
inherited_featuredefined in the KerML specification.
RSysMLImplementation of
inherited_membershipdefined in the KerML specification.
RSysMLImplementation of
inputdefined in the KerML specification.
RSysMLImplementation of
intersecting_typedefined in the KerML specification.
RWSysMLImplementation of
is_abstractdefined in the KerML specification.
RReturns
Trueif thisTypewas declared asabstractin the textual syntax.
RSysMLImplementation of
is_conjugateddefined in the KerML specification.
RWSysMLImplementation of
is_sufficientdefined in the KerML specification.
RReturns
Trueif thisTypewas declared assufficientin the textual syntax.
RSysMLImplementation of
multiplicitydefined in the KerML specification.
RSysMLImplementation of
outputdefined in the KerML specification.
RSysMLImplementation of
owned_conjugatordefined in the KerML specification.
RSysMLImplementation of
owned_differencingdefined in the KerML specification.
RThe
directed_featuresthat are owned by thisType.
RSysMLImplementation of
owned_disjoiningdefined in the KerML specification.
RSysMLImplementation of
owned_end_featuredefined in the KerML specification.
RSysMLImplementation of
owned_feature_membershipdefined in the KerML specification.
RSysMLImplementation of
owned_featuredefined in the KerML specification.
RThe
inputsthat are owned by thisType.
RSysMLImplementation of
owned_intersectingdefined in the KerML specification.
RThe
outputsthat are owned by thisType.
RSysMLImplementation of
owned_specializationdefined in the KerML specification.
RSysMLImplementation of
owned_unioningdefined in the KerML specification.
RThe other type, feature relationships and
FeatureChainingsowned by thisType.
RSysMLImplementation of
unioning_typedefined in the KerML specification.
Returns
Trueif thisTypedirectly or indirectly specializes anotherTypewhile followingFeatureChainings.
Returns the direction of a
Featurein thisType.
Returns
Trueif thisTypedirectly or indirectly specializes anotherTypewhile ignoringFeatureChainings.Members inherited from
Namespace(11 members)
RThe elements enclosed by curly brackets in textual syntax.
RSysMLImplementation of
imported_membershipdefined in the KerML specification.
RSysMLImplementation of
memberdefined in the KerML specification.
RSysMLImplementation of
membershipdefined in the KerML specification.
RSysMLImplementation of
owned_importdefined in the KerML specification.
RSysMLImplementation of
owned_memberdefined in the KerML specification.
RSysMLImplementation of
owned_membershipdefined in the KerML specification.
RMetadata prefixes, prefixed with
#in textual syntax.
Access owned named members by name. Throws
KeyErrorif a member with such name does not exist.
Non-throwing variant of
__getitem__. Returns None if a named member was not found.
Access owned memberships by name. Returns None if an owned member or membership with such name does not exist.
Members inherited from
Element(25 members)
RSysMLImplementation of
alias_idsdefined in the KerML specification.
RThe owned
Commentsrelated byowned_relationships.
RWSysMLImplementation of
declared_namedefined in the KerML specification.
RWSysMLImplementation of
declared_short_namedefined in the KerML specification.
RSysMLImplementation of
documentationdefined in the KerML specification.
RWSysMLImplementation of
element_iddefined in the KerML specification.
RSysMLImplementation of
is_implied_includeddefined in the KerML specification.
RSysMLImplementation of
is_library_elementdefined in the KerML specification.
RThe owned metadata related by
owned_relationships.
RSysMLImplementation of
namedefined in the KerML specification.
RSysMLImplementation of
owned_annotationdefined in the KerML specification.
RSysMLImplementation of
owned_elementdefined in the KerML specification.
RSysMLImplementation of
owned_relationshipdefined in the KerML specification.
RSysMLImplementation of
ownerdefined in the KerML specification.
RSysMLImplementation of
owning_membershipdefined in the KerML specification.
RSysMLImplementation of
owning_namespacedefined in the KerML specification.
RSysMLImplementation of
owning_relationshipdefined in the KerML specification.
RReturn a unique description of the location of this
Elementin the containment structure rooted in a rootNamespace. In most cases the segments will be identical toQualifiedName.
RSysMLImplementation of
qualified_namedefined in the KerML specification.
RThe owner of this
Elementas the parent ofowning_membershiporowning_relationshipotherwise.
RWThe state of semantic resolution for this
Element. Based on this, sema may skip elements to avoid duplicate work, e.g. when resolving elements in a group of related documents.
RSysMLImplementation of
short_namedefined in the KerML specification.
RSysMLImplementation of
textual_representationdefined in the KerML specification.
Check if the qualified name of this
Elementmatches the provided segments of a qualified name.Members inherited from
AstNode(7 members) Attributes
- STD: tuple[type[syside.Feature], ...] = ()
- property basic_feature: syside.Feature
The
last_chaining_featureif one exists, otherwise thisFeature.
- property chaining_features: syside.LazyIterator[syside.Feature]
Implementation of
chaining_featuredefined in the KerML specification.Specification:
The
Featurethat are chained together to determine the values of thisFeature, derived from thechaining_featuresof theowned_feature_chainingsof thisFeature, in the same order. The values of aFeaturewithchaining_featuresare the same as values of the lastFeaturein the chain, which can be found by starting with the values of the firstFeature(for each instance of the domain of the originalFeature), then using each of those as domain instances to find the values of the secondFeaturein chaining_features, and so on, to values of the lastFeature.See section 8.3.3.3.4 of the KerML specification for more details.
- property cross_feature: syside.Feature | None
Implementation of
cross_featuredefined in the KerML specification.Specification:
The second
chaining_featureof thecrossed_featureof theowned_cross_subsettingof thisFeature, if it has one. Semantically, the values of thecross_featureof an endFeaturemust include all values of the endFeatureobtained when navigating from values of the other endFeaturesof the sameowning_type.See section 8.3.3.3.4 of the KerML specification for more details.
- property direction: syside.FeatureDirectionKind | None
Implementation of
directiondefined in the KerML specification.Specification:
Indicates how values of this
Featureare determined or used (as specified for theFeatureDirectionKind).See section 8.3.3.3.4 of the KerML specification for more details.
- property end_owning_type: syside.Type | None
Implementation of
end_owning_typedefined in the KerML specification.Specification:
The
Typethat is related to thisFeatureby anEndFeatureMembershipin which theFeatureis anowned_member_feature.See section 8.3.3.3.4 of the KerML specification for more details.
- property explicit_direction: syside.FeatureDirectionKind | None
Returns the direction this
Featurehas been declared with in the textual syntax.
- property feature_target: syside.Feature
Implementation of
feature_targetdefined in the KerML specification.Specification:
The last of the
chaining_featuresof thisFeature, if it has any. Otherwise, thisFeatureitself.See section 8.3.3.3.4 of the KerML specification for more details.
- property feature_value: syside.FeatureValue | None
The
FeatureValueowned by thisFeatureif any.
- property feature_value_expression: syside.Expression | None
The feature value
Expressionof thisFeatureif any.
- property feature_value_member: syside.FeatureValueAccessor
Syside specific accessor for manipulating
feature_value.
- property featuring_types: syside.LazyIterator[syside.Type]
Implementation of
featuring_typedefined in the KerML specification.Specification:
Typesthat feature thisFeature, such that any instance in the domain of theFeaturemust be classified by all of theseTypes, including at least all thefeaturing_typesof itstype_featurings. If theFeatureis chained, then thefeaturing_typesof the firstFeaturein the chain are alsofeaturing_typesof the chainedFeature.See section 8.3.3.3.4 of the KerML specification for more details.
- property first_chaining_feature: syside.Feature | None
The related
Featurerelated by the firstowned_feature_chainingif any.
- property is_composite: bool
Implementation of
is_compositedefined in the KerML specification.Specification:
Whether the
Featureis a compositefeatureof itsfeaturing_type. If so, the values of theFeaturecannot exist after its featuring instance no longer does and cannot be values of another composite feature that is not on the same featuring instance.See section 8.3.3.3.4 of the KerML specification for more details.
- property is_composite_explicitly: bool
Returns
Trueif thisFeaturehas been declaredcompositein the textual syntax.
- property is_constant: bool
Implementation of
is_constantdefined in the KerML specification.Specification:
If
is_variableis true, then whether the value of thisFeaturenevertheless does not change over allsnapshotsof itsowning_type.See section 8.3.3.3.4 of the KerML specification for more details.
- property is_constant_explicitly: bool
Returns
Trueif thisFeaturehas been declaredconstantin the textual syntax.
- property is_derived: bool
Implementation of
is_deriveddefined in the KerML specification.Specification:
Whether the values of this
Featurecan always be computed from the values of otherFeatures.See section 8.3.3.3.4 of the KerML specification for more details.
- property is_end: bool
Implementation of
is_enddefined in the KerML specification.Specification:
Whether or not this
Featureis an endFeature. An endFeaturealways has multiplicity 1, mapping each of its domain instances to a single co-domain instance. However, it may have across_feature, in which case values of thecross_featuremust be the same as those found by navigation across instances of theowning_typefrom values of other endFeaturesto values of this Feature. If theowning_typehas n endFeatures, then the multiplicity, ordering, and uniqueness declared for thecross_featureof any one of these endFeaturesconstrains the cardinality, ordering, and uniqueness of the collection of values of thatFeaturereached by navigation when the values of the other n-1 endFeaturesare held fixed.See section 8.3.3.3.4 of the KerML specification for more details.
- property is_end_explicitly: bool
Returns
Trueif thisFeaturehas been declaredendin the textual syntax.
- property is_nonunique: bool
- property is_ordered: bool
Implementation of
is_ordereddefined in the KerML specification.Specification:
Whether an order exists for the values of this
Featureor not.See section 8.3.3.3.4 of the KerML specification for more details.
- property is_portion: bool
Implementation of
is_portiondefined in the KerML specification.Specification:
Whether the values of this
Featureare contained in the space and time of instances of the domain of theFeatureand represent the same thing as those instances.See section 8.3.3.3.4 of the KerML specification for more details.
- property is_read_only: bool
Alias for is_constant.
Removed in 2025-04 specification, will be removed in a future Syside release.
- property is_unique: bool
Implementation of
is_uniquedefined in the KerML specification.Specification:
Whether or not values for this
Featuremust have no duplicates or not.See section 8.3.3.3.4 of the KerML specification for more details.
- property is_variable: bool
Implementation of
is_variabledefined in the KerML specification.Specification:
Whether the value of this
Featuremight vary over time. That is, whether theFeaturemay have a different value for eachsnapshotof anowning_typethat is anOccurrence.See section 8.3.3.3.4 of the KerML specification for more details.
Note that this will raise
TypeErrorif attempting to setis_variableonUsagesbecause it is computed by sema, seeUsage.may_time_vary. Prefer usingtry_set_is_variablefor non-raising behaviour.
- property is_variable_explicitly: bool
Returns
Trueif thisFeaturehas been declaredvariablein the textual syntax.
- property last_chaining_feature: syside.Feature | None
The related
Featurerelated by the lastowned_feature_chainingif any.
- property owned_cross_feature: syside.Feature | None
The member
Featurethat is declared before any prefixes in the textual syntax.
- property owned_cross_feature_member: syside.OwnedFeatureAccessor
Syside specific accessor for either owned crossing_feature or crossing_multiplicity. This is the member
Featurethat is declared before any prefixes in the textual syntax.
- property owned_cross_subsetting: syside.CrossSubsetting | None
Implementation of
owned_cross_subsettingdefined in the KerML specification.Specification:
The one
owned_subsettingof thisFeature, if any, that is aCrossSubsetting}, for which the Feature is the crossing_feature.See section 8.3.3.3.4 of the KerML specification for more details.
- property owned_feature_chainings: syside.LazyIterator[syside.FeatureChaining]
Implementation of
owned_feature_chainingdefined in the KerML specification.Specification:
The
owned_relationshipsof thisFeaturethat areFeatureChainings, for which theFeaturewill be thefeature_chained.See section 8.3.3.3.4 of the KerML specification for more details.
- property owned_feature_invertings: syside.LazyIterator[syside.FeatureInverting]
Implementation of
owned_feature_invertingdefined in the KerML specification.Specification:
The
owned_relationshipsof thisFeaturethat areFeatureInvertingsand for which theFeatureis thefeature_inverted.See section 8.3.3.3.4 of the KerML specification for more details.
- property owned_redefinitions: syside.LazyIterator[syside.Redefinition]
Implementation of
owned_redefinitiondefined in the KerML specification.Specification:
The
owned_subsettingsof thisFeaturethat areRedefinitions, for which theFeatureis theredefining_feature.See section 8.3.3.3.4 of the KerML specification for more details.
- property owned_reference_subsetting: syside.ReferenceSubsetting | None
Implementation of
owned_reference_subsettingdefined in the KerML specification.Specification:
The one
owned_subsettingof thisFeature, if any, that is aReferenceSubsetting, for which theFeatureis thereferencing_feature.See section 8.3.3.3.4 of the KerML specification for more details.
- property owned_subsettings: syside.LazyIterator[syside.Subsetting]
Implementation of
owned_subsettingdefined in the KerML specification.Specification:
The
owned_specializationsof thisFeaturethat areSubsettings, for which theFeatureis thesubsetting_feature.See section 8.3.3.3.4 of the KerML specification for more details.
- property owned_type_featurings: syside.LazyIterator[syside.TypeFeaturing]
Implementation of
owned_type_featuringdefined in the KerML specification.Specification:
The
owned_relationshipsof thisFeaturethat areTypeFeaturingsand for which theFeatureis thefeature_of_type.See section 8.3.3.3.4 of the KerML specification for more details.
- property owned_typings: syside.LazyIterator[syside.FeatureTyping]
Implementation of
owned_typingdefined in the KerML specification.Specification:
The
owned_specializationsof thisFeaturethat areFeatureTypings, for which theFeatureis thetyped_feature.See section 8.3.3.3.4 of the KerML specification for more details.
- property owning_feature_membership: syside.FeatureMembership | None
Implementation of
owning_feature_membershipdefined in the KerML specification.Specification:
The
FeatureMembershipthat owns thisFeatureas anowned_member_feature, determining itsowning_type.See section 8.3.3.3.4 of the KerML specification for more details.
- property owning_type: syside.Type | None
Implementation of
owning_typedefined in the KerML specification.Specification:
The
Typethat is theowning_typeof theowning_feature_membershipof thisFeature.See section 8.3.3.3.4 of the KerML specification for more details.
- property referenced_feature: syside.Feature | None
Returns the
FeaturethisFeaturereferences throughReferenceSubsettingif any.
- property referenced_feature_target: syside.Feature | None
Returns the
feature_targetofreferenced_feature, i.e.referenced_feature.feature_target.
- property types: syside.LazyIterator[syside.Type]
Implementation of
typedefined in the KerML specification.Specification:
Typesthat restrict the values of thisFeature, such that the values must be instances of all thetypes. The types of aFeatureare derived from itstypingsand thetypesof itssubsettings. If theFeatureis chained, then thetypesof the lastFeaturein the chain are alsotypesof the chainedFeature.See section 8.3.3.3.4 of the KerML specification for more details.
Methods
- find_owned_cross_feature() syside.Feature | None
Find the owned cross feature by potentially checking children. This is needed for spec that defined owned cross feature as the first member feature that is not a MetadataFeature or Multiplicity of an end feature. Since SysML does not allow member features (member keyword in KerML), this is equivalent to owned_cross_feature in SysML.
- try_set_is_variable(arg: bool, /) bool
Non-raising variant of
is_variablesetter that returnsFalseonUsageswithout modifyingis_variable.