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(39 members)
R
RThe
last_chaining_featureif one exists, otherwise thisFeature.
RThe 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.
RWIndicates how values of this
Featureare determined or used (as specified for theFeatureDirectionKind).
RThe
Typethat is related to thisFeatureby anEndFeatureMembershipin which theFeatureis anowned_member_feature.
RReturns the direction this
Featurehas been declared with in the textual syntax.
RThe last of the
chaining_featuresof thisFeature, if it has any. Otherwise, thisFeatureitself.
RThe
FeatureValueowned by thisFeatureif any.
RThe feature value
Expressionof thisFeatureif any.
RSysIDE specific accessor for manipulating
feature_value.
RTypesthat 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.
RThe related
Featurerelated by the firstowned_feature_chainingif any.
RWWhether the
Featureis a compositefeatureof itsfeaturing_type. If so, the values of theFeaturecannot exist after its featuring instance no longer does.
RReturns
Trueif thisFeaturehas been declaredcompositein the textual syntax.
RWWhether the values of this
Featurecan always be computed from the values of otherFeatures.
RWWhether 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.
RReturns
Trueif thisFeaturehas been declaredendin the textual syntax.
RW
RWWhether an order exists for the values of this
Featureor not.
RWWhether 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.
RWWhether the values of this
Featurecan change over the lifetime of an instance of the domain.
RWWhether or not values for this
Featuremust have no duplicates or not.
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.
RThe one
owned_subsettingof thisFeature, if any, that is aCrossSubsetting}, for which the Feature is the crossing_feature.
RThe
owned_relationshipsof thisFeaturethat areFeatureChainings, for which theFeaturewill be thefeature_chained.
RThe
owned_relationshipsof thisFeaturethat areFeatureInvertingsand for which theFeatureis thefeature_inverted.
RThe
owned_subsettingsof thisFeaturethat areRedefinitions, for which theFeatureis theredefining_feature.
RThe one
owned_subsettingof thisFeature, if any, that is aReferenceSubsetting, for which theFeatureis thereferencing_feature.
RThe
owned_specializationsof thisFeaturethat areSubsettings, for which theFeatureis thesubsetting_feature.
RThe
owned_relationshipsof thisFeaturethat areTypeFeaturingsand for which theFeatureis thefeature_of_type.
RThe
owned_specializationsof thisFeaturethat areFeatureTypings, for which theFeatureis thetyped_feature.
RThe
FeatureMembershipthat owns thisFeatureas anowned_member_feature, determining itsowning_type.
RThe
Typethat is theowning_typeof theowning_feature_membershipof thisFeature.
RReturns the
FeaturethisFeaturereferences throughReferenceSubsettingif any.
RReturns the
feature_targetofreferenced_feature, i.e.referenced_feature.feature_target.
RTypesthat 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.
Members inherited from
Type(36 members)
RThe owned multiplicity that is declared before the children block in the textual syntax.
RSysIDE specific accessor for manipulating
declared_multiplicity.
RThe interpretations of a
Typewithdifferencing_typesare asserted to be those of the first of thoseTypes, but not including those of the remainingTypes. For example, aClassifiermight be the difference of aClassifierfor people and another for people of a particular nationality, leaving people who are not of that nationality. Similarly, a feature of people might be the difference between a feature for their children and aClassifierfor people of a particular sex, identifying their children not of that sex (because the interpretations of the childrenFeaturethat identify those of that sex are also interpretations of theClassifierfor that sex).
RThe
featuresof thisTypethat have a non-nulldirection.
RThe types that related to this
Typethroughowned_disjoinings.
RAll
featuresof thisTypewithis_end = true.
RThe
FeatureMembershipsforfeaturesof thisType, which include allowned_feature_membershipsand thoseinherited_membershipsthat areFeatureMemberships(but does not include anyimported_memberships).
RThe
owned_member_featuresof thefeature_membershipsof thisType.
RThe specializations and conjugations owned by this
Type.
RAll the
member_featuresof theinherited_membershipsof thisTypethat areFeatureMemberships.
RAll
Membershipsinherited by thisTypeviaSpecializationorConjugation. These are included in the derived union for themembershipsof theType.
RAll
featuresrelated to thisTypebyFeatureMembershipsthat havedirectioninorinout.
RThe interpretations of a
Typewithintersecting_typesare asserted to be those in common among theintersecting_types, which are theTypesderived from theintersecting_typeof theowned_intersectingsof thisType. For example, aClassifiermight be an intersection ofClassifiersfor people of a particular sex and of a particular nationality. Similarly, a feature for people’s children of a particular sex might be the intersection of aFeaturefor their children and aClassifierfor people of that sex (because the interpretations of the childrenFeaturethat identify those of that sex are also interpretations of the Classifier for that sex).
RWIndicates whether instances of this
Typemust also be instances of at least one of its specializedTypes.
RIndicates whether this
Typehas anowned_conjugator.
RWWhether all things that meet the classification conditions of this
Typemust be classified by theType.
RReturns
Trueif thisTypewas declared assufficientin the textual syntax.
RAn
owned_memberof thisTypethat is aMultiplicity, which constraints the cardinality of theType. If there is no suchowned_member, then the cardinality of thisTypeis constrained by all theMultiplicityconstraints applicable to any direct supertypes.
RAll
featuresrelated to thisTypebyFeatureMembershipsthat havedirectionoutorinout.
RA
Conjugationowned by thisTypefor which theTypeis theoriginal_type.
RThe
owned_relationshipsof thisTypethat areDifferencings, having thisTypeas theirtype_differenced.
RThe
directed_featuresthat are owned by thisType.
RThe
owned_relationshipsof thisTypethat areDisjoinings, for which theTypeis thetype_disjoinedType.
RAll
end_featuresof thisTypethat areowned_features.
RThe
owned_membershipsof thisTypethat areFeatureMemberships, for which theTypeis theowning_type. Each suchFeatureMembershipidentifies anowned_featureof theType.
RThe
owned_member_featuresof theowned_feature_membershipsof thisType.
RThe
inputsthat are owned by thisType.
RThe
owned_relationshipsof thisTypethat areIntersectings, have theTypeas theirtype_intersected.
RThe
outputsthat are owned by thisType.
RThe
owned_relationshipsof thisTypethat areSpecializations, for which theTypeis thespecificType.
RThe
owned_relationshipsof thisTypethat areUnionings, having theTypeas theirtype_unioned.
RThe other type, feature relationships and
FeatureChainingsowned by thisType.
RThe interpretations of a
Typewithunioning_typesare asserted to be the same as those of all theunioning_typestogether, which are theTypesderived from theunioning_typeof theowned_unioningsof thisType. For example, aClassifierfor people might be the union ofClassifiersfor all the sexes. Similarly, a feature for people’s children might be the union of features dividing them in the same ways as people in general.
Members inherited from
Namespace(10 members)
RThe elements enclosed by curly brackets in textual syntax.
RThe set of all member
Elementsof thisNamespace, which are themember_elementsof allmembershipsof theNamespace.
RAll
Membershipsin thisNamespace, including (at least) the union ofowned_membershipsandimported_memberships.
RThe
owned_relationshipsof thisNamespacethat areImports, for which theNamespaceis theimport_owning_namespace.
RThe owned
membersof thisNamespace, which are theowned_member_elementsof theowned_membershipsof theNamespace.
RThe
owned_relationshipsof thisNamespacethat areMemberships, for which theNamespaceis themembership_owning_namespace.
RMetadata prefixes, prefixed with
#in textual syntax.
Members inherited from
Element(23 members)
RThe owned
Commentsrelated byowned_relationships.
RWThe declared name of this
Element.
RWAn optional alternative name for the
Elementthat is intended to be shorter or in some way more succinct than its primaryname. It may act as a modeler-specified identifier for theElement, though it is then the responsibility of the modeler to maintain the uniqueness of this identifier within a model or relative to some other context.
RThe Documentation owned by this Element.
RW- The globally unique identifier for this Element. This is intended to be
set by tooling, and it must not change during the lifetime of the Element.
RWhether all necessary implied Relationships have been included in the
owned_relationshipsof this Element. This property may be true, even if there are not actually anyowned_relationshipswithis_implied = true, meaning that no such Relationships are actually implied for this Element. However, if it is false, thenowned_relationshipsmay not contain any implied Relationships. That is, either all required implied Relationships must be included, or none of them.
RWhether this Element is contained in the ownership tree of a library model.
RThe owned metadata related by
owned_relationships.
RThe name to be used for this
Elementduring name resolution within itsowning_namespace. This is derived using theeffective_name()operation. By default, it is the same as thedeclared_name, but this is overridden for certain kinds ofElementsto compute anameeven when thedeclared_nameis null.
RThe
owned_relationshipsof thisElementthat areAnnotations, for which thisElementis theannotated_element.
RThe Elements owned by this Element, derived as the owned_related_elements of the owned_relationships of this Element.
RThe Relationships for which this Element is the owning_related_element.
RThe owner of this Element, derived as the
owning_related_elementof theowning_relationshipof this Element, if any.
RThe
owning_relationshipof thisElement, if thatRelationshipis aMembership.
RThe
Namespacethat owns thisElement, which is themembership_owning_namespaceof theowning_membershipof thisElement, if any.
RThe Relationship for which this Element is an owned_related_element, if any.
RThe full ownership-qualified name of this
Element, represented in a form that is valid according to the KerML textual concrete syntax for qualified names (including use of unrestricted name notation and escaped characters, as necessary). Thequalified_nameis null if thisElementhas noowning_namespaceor if there is not a complete ownership chain of namedNamespacesfrom a rootNamespaceto thisElement.
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.
RThe short name to be used for this
Elementduring name resolution within itsowning_namespace. This is derived using theeffective_short_name()operation. By default, it is the same as thedeclared_short_name, but this is overridden for certain kinds ofElementsto compute ashort_nameeven when thedeclared_nameis null.
RThe
TextualRepresentationsthat annotate thisElement.
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 cross_feature: syside.Feature | None
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.
- property direction: syside.FeatureDirectionKind | None
Indicates how values of this
Featureare determined or used (as specified for theFeatureDirectionKind).
- property end_owning_type: syside.Type | None
The
Typethat is related to thisFeatureby anEndFeatureMembershipin which theFeatureis anowned_member_feature.
- property explicit_direction: syside.FeatureDirectionKind | None
Returns the direction this
Featurehas been declared with in the textual syntax.
- property feature_target: syside.Feature
The last of the
chaining_featuresof thisFeature, if it has any. Otherwise, thisFeatureitself.
- 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]
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.
- property first_chaining_feature: syside.Feature | None
The related
Featurerelated by the firstowned_feature_chainingif any.
- property is_composite: bool
Whether the
Featureis a compositefeatureof itsfeaturing_type. If so, the values of theFeaturecannot exist after its featuring instance no longer does.
- property is_composite_explicitly: bool
Returns
Trueif thisFeaturehas been declaredcompositein the textual syntax.
- property is_derived: bool
Whether the values of this
Featurecan always be computed from the values of otherFeatures.
- property is_end: bool
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.
- property is_end_explicitly: bool
Returns
Trueif thisFeaturehas been declaredendin the textual syntax.
- property is_nonunique: bool
- property is_ordered: bool
Whether an order exists for the values of this
Featureor not.
- property is_portion: bool
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.
- property is_read_only: bool
Whether the values of this
Featurecan change over the lifetime of an instance of the domain.
- property is_unique: bool
Whether or not values for this
Featuremust have no duplicates or not.
- 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
The one
owned_subsettingof thisFeature, if any, that is aCrossSubsetting}, for which the Feature is the crossing_feature.
- property owned_feature_chainings: syside.LazyIterator[syside.FeatureChaining]
The
owned_relationshipsof thisFeaturethat areFeatureChainings, for which theFeaturewill be thefeature_chained.
- property owned_feature_invertings: syside.LazyIterator[syside.FeatureInverting]
The
owned_relationshipsof thisFeaturethat areFeatureInvertingsand for which theFeatureis thefeature_inverted.
- property owned_redefinitions: syside.LazyIterator[syside.Redefinition]
The
owned_subsettingsof thisFeaturethat areRedefinitions, for which theFeatureis theredefining_feature.
- property owned_reference_subsetting: syside.ReferenceSubsetting | None
The one
owned_subsettingof thisFeature, if any, that is aReferenceSubsetting, for which theFeatureis thereferencing_feature.
- property owned_subsettings: syside.LazyIterator[syside.Subsetting]
The
owned_specializationsof thisFeaturethat areSubsettings, for which theFeatureis thesubsetting_feature.
- property owned_type_featurings: syside.LazyIterator[syside.TypeFeaturing]
The
owned_relationshipsof thisFeaturethat areTypeFeaturingsand for which theFeatureis thefeature_of_type.
- property owned_typings: syside.LazyIterator[syside.FeatureTyping]
The
owned_specializationsof thisFeaturethat areFeatureTypings, for which theFeatureis thetyped_feature.
- property owning_feature_membership: syside.FeatureMembership | None
The
FeatureMembershipthat owns thisFeatureas anowned_member_feature, determining itsowning_type.
- property owning_type: syside.Type | None
The
Typethat is theowning_typeof theowning_feature_membershipof thisFeature.
- 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]
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.
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.