Feature SysML

class Feature

Implementation of Feature defined in the KerML specification.

Specification:

A Feature is a Type that classifies relations between multiple things (in the universe). The domain of the relation is the intersection of the featuring_types of the Feature. (The domain of a Feature with no featuring_types is implicitly the most general Type Base::Anything from the Kernel Semantic Library.) The co-domain of the relation is the intersection of the types of the Feature.

In the simplest cases, the featuring_types and types are Classifiers and the Feature relates 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 Features are Types, their featuring_types and types can be Features. In this case, the Feature effectively classifies relations between relations, which can be interpreted as the sequence of things related by the domain Feature concatenated with the sequence of things related by the co-domain Feature.

The values of a Feature for a given instance of its domain are all the instances of its co-domain that are related to that domain instance by the Feature. The values of a Feature with chaining_features are the same as values of the last Feature in the chain, which can be found by starting with values of the first Feature, then using those values as domain instances to obtain values of the second Feature, and so on, to values of the last Feature.

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.

%3 Feature Feature syside.Feature Type Type syside.Type Type->Feature Namespace Namespace syside.Namespace Namespace->Type Element Element syside.Element Element->Namespace AstNode AstNode syside.AstNode AstNode->Element
Children
Members defined in Feature (45 members)

STD

R

basic_feature

R

The last_chaining_feature if one exists, otherwise this Feature.

chaining_features

R SysML

Implementation of chaining_feature defined in the KerML specification.

cross_feature

R SysML

Implementation of cross_feature defined in the KerML specification.

direction

RW SysML

Implementation of direction defined in the KerML specification.

end_owning_type

R SysML

Implementation of end_owning_type defined in the KerML specification.

explicit_direction

R

Returns the direction this Feature has been declared with in the textual syntax.

feature_target

R SysML

Implementation of feature_target defined in the KerML specification.

feature_value

R

The FeatureValue owned by this Feature if any.

feature_value_expression

R

The feature value Expression of this Feature if any.

feature_value_member

R

Syside specific accessor for manipulating feature_value.

featuring_types

R SysML

Implementation of featuring_type defined in the KerML specification.

first_chaining_feature

R

The related Feature related by the first owned_feature_chaining if any.

is_composite

RW SysML

Implementation of is_composite defined in the KerML specification.

is_composite_explicitly

R

Returns True if this Feature has been declared composite in the textual syntax.

is_constant

RW SysML

Implementation of is_constant defined in the KerML specification.

is_constant_explicitly

R

Returns True if this Feature has been declared constant in the textual syntax.

is_derived

RW SysML

Implementation of is_derived defined in the KerML specification.

is_end

RW SysML

Implementation of is_end defined in the KerML specification.

is_end_explicitly

R

Returns True if this Feature has been declared end in the textual syntax.

is_nonunique

RW

is_ordered

RW SysML

Implementation of is_ordered defined in the KerML specification.

is_portion

RW SysML

Implementation of is_portion defined in the KerML specification.

is_read_only

RW

Alias for is_constant.

is_unique

RW SysML

Implementation of is_unique defined in the KerML specification.

is_variable

RW SysML

Implementation of is_variable defined in the KerML specification.

is_variable_explicitly

R

Returns True if this Feature has been declared variable in the textual syntax.

last_chaining_feature

R

The related Feature related by the last owned_feature_chaining if any.

owned_cross_feature

R

The member Feature that is declared before any prefixes in the textual syntax.

owned_cross_feature_member

R

Syside specific accessor for either owned crossing_feature or crossing_multiplicity. This is the member Feature that is declared before any prefixes in the textual syntax.

owned_cross_subsetting

R SysML

Implementation of owned_cross_subsetting defined in the KerML specification.

owned_feature_chainings

R SysML

Implementation of owned_feature_chaining defined in the KerML specification.

owned_feature_invertings

R SysML

Implementation of owned_feature_inverting defined in the KerML specification.

owned_redefinitions

R SysML

Implementation of owned_redefinition defined in the KerML specification.

owned_reference_subsetting

R SysML

Implementation of owned_reference_subsetting defined in the KerML specification.

owned_subsettings

R SysML

Implementation of owned_subsetting defined in the KerML specification.

owned_type_featurings

R SysML

Implementation of owned_type_featuring defined in the KerML specification.

owned_typings

R SysML

Implementation of owned_typing defined in the KerML specification.

owning_feature_membership

R SysML

Implementation of owning_feature_membership defined in the KerML specification.

owning_type

R SysML

Implementation of owning_type defined in the KerML specification.

referenced_feature

R

Returns the Feature this Feature references through ReferenceSubsetting if any.

referenced_feature_target

R

Returns the feature_target of referenced_feature, i.e. referenced_feature.feature_target.

types

R SysML

Implementation of type defined in the KerML specification.

find_owned_cross_feature

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

Non-raising variant of is_variable setter that returns False on Usages without modifying is_variable.

Members inherited from Type (37 members)

declared_multiplicity

R

The owned multiplicity that is declared before the children block in the textual syntax.

declared_multiplicity_member

R

Syside specific accessor for manipulating declared_multiplicity.

differencing_types

R SysML

Implementation of differencing_type defined in the KerML specification.

directed_features

R SysML

Implementation of directed_feature defined in the KerML specification.

disjoining_types

R

The types that related to this Type through owned_disjoinings.

end_features

R SysML

Implementation of end_feature defined in the KerML specification.

feature_memberships

R SysML

Implementation of feature_membership defined in the KerML specification.

features

R SysML

Implementation of feature defined in the KerML specification.

heritage

R

The specializations and conjugations owned by this Type.

inherited_features

R SysML

Implementation of inherited_feature defined in the KerML specification.

inherited_memberships

R SysML

Implementation of inherited_membership defined in the KerML specification.

inputs

R SysML

Implementation of input defined in the KerML specification.

intersecting_types

R SysML

Implementation of intersecting_type defined in the KerML specification.

is_abstract

RW SysML

Implementation of is_abstract defined in the KerML specification.

is_abstract_explicitly

R

Returns True if this Type was declared as abstract in the textual syntax.

is_conjugated

R SysML

Implementation of is_conjugated defined in the KerML specification.

is_sufficient

RW SysML

Implementation of is_sufficient defined in the KerML specification.

is_sufficient_explicitly

R

Returns True if this Type was declared as sufficient in the textual syntax.

multiplicity

R SysML

Implementation of multiplicity defined in the KerML specification.

outputs

R SysML

Implementation of output defined in the KerML specification.

owned_conjugator

R SysML

Implementation of owned_conjugator defined in the KerML specification.

owned_differencings

R SysML

Implementation of owned_differencing defined in the KerML specification.

owned_directed_features

R

The directed_features that are owned by this Type.

owned_disjoinings

R SysML

Implementation of owned_disjoining defined in the KerML specification.

owned_end_features

R SysML

Implementation of owned_end_feature defined in the KerML specification.

owned_feature_memberships

R SysML

Implementation of owned_feature_membership defined in the KerML specification.

owned_features

R SysML

Implementation of owned_feature defined in the KerML specification.

owned_inputs

R

The inputs that are owned by this Type.

owned_intersectings

R SysML

Implementation of owned_intersecting defined in the KerML specification.

owned_outputs

R

The outputs that are owned by this Type.

owned_specializations

R SysML

Implementation of owned_specialization defined in the KerML specification.

owned_unionings

R SysML

Implementation of owned_unioning defined in the KerML specification.

type_relationships

R

The other type, feature relationships and FeatureChainings owned by this Type.

unioning_types

R SysML

Implementation of unioning_type defined in the KerML specification.

conforms

Returns True if this Type directly or indirectly specializes another Type while following FeatureChainings.

direction_of

Returns the direction of a Feature in this Type.

specializes

Returns True if this Type directly or indirectly specializes another Type while ignoring FeatureChainings.

Members inherited from Namespace (11 members)

children

R

The elements enclosed by curly brackets in textual syntax.

imported_memberships

R SysML

Implementation of imported_membership defined in the KerML specification.

members

R SysML

Implementation of member defined in the KerML specification.

memberships

R SysML

Implementation of membership defined in the KerML specification.

owned_imports

R SysML

Implementation of owned_import defined in the KerML specification.

owned_members

R SysML

Implementation of owned_member defined in the KerML specification.

owned_memberships

R SysML

Implementation of owned_membership defined in the KerML specification.

prefixes

R

Metadata prefixes, prefixed with # in textual syntax.

__getitem__

Access owned named members by name. Throws KeyError if a member with such name does not exist.

get_member

Non-throwing variant of __getitem__. Returns None if a named member was not found.

get_membership

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)

alias_ids

R SysML

Implementation of alias_ids defined in the KerML specification.

comments

R

The owned Comments related by owned_relationships.

declared_name

RW SysML

Implementation of declared_name defined in the KerML specification.

declared_short_name

RW SysML

Implementation of declared_short_name defined in the KerML specification.

documentation

R SysML

Implementation of documentation defined in the KerML specification.

element_id

RW SysML

Implementation of element_id defined in the KerML specification.

is_implied_included

R SysML

Implementation of is_implied_included defined in the KerML specification.

is_library_element

R SysML

Implementation of is_library_element defined in the KerML specification.

metadata

R

The owned metadata related by owned_relationships.

name

R SysML

Implementation of name defined in the KerML specification.

owned_annotations

R SysML

Implementation of owned_annotation defined in the KerML specification.

owned_elements

R SysML

Implementation of owned_element defined in the KerML specification.

owned_relationships

R SysML

Implementation of owned_relationship defined in the KerML specification.

owner

R SysML

Implementation of owner defined in the KerML specification.

owning_membership

R SysML

Implementation of owning_membership defined in the KerML specification.

owning_namespace

R SysML

Implementation of owning_namespace defined in the KerML specification.

owning_relationship

R SysML

Implementation of owning_relationship defined in the KerML specification.

path

R

Return a unique description of the location of this Element in the containment structure rooted in a root Namespace. In most cases the segments will be identical to QualifiedName.

qualified_name

R SysML

Implementation of qualified_name defined in the KerML specification.

scoped_owner

R

The owner of this Element as the parent of owning_membership or owning_relationship otherwise.

sema_state

RW

The 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.

short_name

R SysML

Implementation of short_name defined in the KerML specification.

textual_representations

R SysML

Implementation of textual_representation defined in the KerML specification.

__str__

matches_qualified_name

Check if the qualified name of this Element matches the provided segments of a qualified name.

Members inherited from AstNode (7 members)

cst_node

R

document

R

parent

R

__hash__

cast

isinstance

try_cast

Attributes

STD: tuple[type[syside.Feature], ...] = ()
property basic_feature: syside.Feature

The last_chaining_feature if one exists, otherwise this Feature.

property chaining_features: syside.LazyIterator[syside.Feature]

Implementation of chaining_feature defined in the KerML specification.

Specification:

The Feature that are chained together to determine the values of this Feature, derived from the chaining_features of the owned_feature_chainings of this Feature, in the same order. The values of a Feature with chaining_features are the same as values of the last Feature in the chain, which can be found by starting with the values of the first Feature (for each instance of the domain of the original Feature), then using each of those as domain instances to find the values of the second Feature in chaining_features, and so on, to values of the last Feature.

See section 8.3.3.3.4 of the KerML specification for more details.

property cross_feature: syside.Feature | None

Implementation of cross_feature defined in the KerML specification.

Specification:

The second chaining_feature of the crossed_feature of the owned_cross_subsetting of this Feature, if it has one. Semantically, the values of the cross_feature of an end Feature must include all values of the end Feature obtained when navigating from values of the other end Features of the same owning_type.

See section 8.3.3.3.4 of the KerML specification for more details.

property direction: syside.FeatureDirectionKind | None

Implementation of direction defined in the KerML specification.

Specification:

Indicates how values of this Feature are determined or used (as specified for the FeatureDirectionKind).

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_type defined in the KerML specification.

Specification:

The Type that is related to this Feature by an EndFeatureMembership in which the Feature is an owned_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 Feature has been declared with in the textual syntax.

property feature_target: syside.Feature

Implementation of feature_target defined in the KerML specification.

Specification:

The last of the chaining_features of this Feature, if it has any. Otherwise, this Feature itself.

See section 8.3.3.3.4 of the KerML specification for more details.

property feature_value: syside.FeatureValue | None

The FeatureValue owned by this Feature if any.

property feature_value_expression: syside.Expression | None

The feature value Expression of this Feature if any.

property feature_value_member: syside.FeatureValueAccessor

Syside specific accessor for manipulating feature_value.

property featuring_types: syside.LazyIterator[syside.Type]

Implementation of featuring_type defined in the KerML specification.

Specification:

Types that feature this Feature, such that any instance in the domain of the Feature must be classified by all of these Types, including at least all the featuring_types of its type_featurings. If the Feature is chained, then the featuring_types of the first Feature in the chain are also featuring_types of the chained Feature.

See section 8.3.3.3.4 of the KerML specification for more details.

property first_chaining_feature: syside.Feature | None

The related Feature related by the first owned_feature_chaining if any.

property is_composite: bool

Implementation of is_composite defined in the KerML specification.

Specification:

Whether the Feature is a composite feature of its featuring_type. If so, the values of the Feature cannot 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 True if this Feature has been declared composite in the textual syntax.

property is_constant: bool

Implementation of is_constant defined in the KerML specification.

Specification:

If is_variable is true, then whether the value of this Feature nevertheless does not change over all snapshots of its owning_type.

See section 8.3.3.3.4 of the KerML specification for more details.

property is_constant_explicitly: bool

Returns True if this Feature has been declared constant in the textual syntax.

property is_derived: bool

Implementation of is_derived defined in the KerML specification.

Specification:

Whether the values of this Feature can always be computed from the values of other Features.

See section 8.3.3.3.4 of the KerML specification for more details.

property is_end: bool

Implementation of is_end defined in the KerML specification.

Specification:

Whether or not this Feature is an end Feature. An end Feature always has multiplicity 1, mapping each of its domain instances to a single co-domain instance. However, it may have a cross_feature, in which case values of the cross_feature must be the same as those found by navigation across instances of the owning_type from values of other end Features to values of this Feature. If the owning_type has n end Features, then the multiplicity, ordering, and uniqueness declared for the cross_feature of any one of these end Features constrains the cardinality, ordering, and uniqueness of the collection of values of that Feature reached by navigation when the values of the other n-1 end Features are held fixed.

See section 8.3.3.3.4 of the KerML specification for more details.

property is_end_explicitly: bool

Returns True if this Feature has been declared end in the textual syntax.

property is_nonunique: bool
property is_ordered: bool

Implementation of is_ordered defined in the KerML specification.

Specification:

Whether an order exists for the values of this Feature or not.

See section 8.3.3.3.4 of the KerML specification for more details.

property is_portion: bool

Implementation of is_portion defined in the KerML specification.

Specification:

Whether the values of this Feature are contained in the space and time of instances of the domain of the Feature and 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_unique defined in the KerML specification.

Specification:

Whether or not values for this Feature must 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_variable defined in the KerML specification.

Specification:

Whether the value of this Feature might vary over time. That is, whether the Feature may have a different value for each snapshot of an owning_type that is an Occurrence.

See section 8.3.3.3.4 of the KerML specification for more details.

Note that this will raise TypeError if attempting to set is_variable on Usages because it is computed by sema, see Usage.may_time_vary. Prefer using try_set_is_variable for non-raising behaviour.

property is_variable_explicitly: bool

Returns True if this Feature has been declared variable in the textual syntax.

property last_chaining_feature: syside.Feature | None

The related Feature related by the last owned_feature_chaining if any.

property owned_cross_feature: syside.Feature | None

The member Feature that 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 Feature that is declared before any prefixes in the textual syntax.

property owned_cross_subsetting: syside.CrossSubsetting | None

Implementation of owned_cross_subsetting defined in the KerML specification.

Specification:

The one owned_subsetting of this Feature, if any, that is a CrossSubsetting}, 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_chaining defined in the KerML specification.

Specification:

The owned_relationships of this Feature that are FeatureChainings, for which the Feature will be the feature_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_inverting defined in the KerML specification.

Specification:

The owned_relationships of this Feature that are FeatureInvertings and for which the Feature is the feature_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_redefinition defined in the KerML specification.

Specification:

The owned_subsettings of this Feature that are Redefinitions, for which the Feature is the redefining_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_subsetting defined in the KerML specification.

Specification:

The one owned_subsetting of this Feature, if any, that is a ReferenceSubsetting, for which the Feature is the referencing_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_subsetting defined in the KerML specification.

Specification:

The owned_specializations of this Feature that are Subsettings, for which the Feature is the subsetting_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_featuring defined in the KerML specification.

Specification:

The owned_relationships of this Feature that are TypeFeaturings and for which the Feature is the feature_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_typing defined in the KerML specification.

Specification:

The owned_specializations of this Feature that are FeatureTypings, for which the Feature is the typed_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_membership defined in the KerML specification.

Specification:

The FeatureMembership that owns this Feature as an owned_member_feature, determining its owning_type.

See section 8.3.3.3.4 of the KerML specification for more details.

property owning_type: syside.Type | None

Implementation of owning_type defined in the KerML specification.

Specification:

The Type that is the owning_type of the owning_feature_membership of this Feature.

See section 8.3.3.3.4 of the KerML specification for more details.

property referenced_feature: syside.Feature | None

Returns the Feature this Feature references through ReferenceSubsetting if any.

property referenced_feature_target: syside.Feature | None

Returns the feature_target of referenced_feature, i.e. referenced_feature.feature_target.

property types: syside.LazyIterator[syside.Type]

Implementation of type defined in the KerML specification.

Specification:

Types that restrict the values of this Feature, such that the values must be instances of all the types. The types of a Feature are derived from its typings and the types of its subsettings. If the Feature is chained, then the types of the last Feature in the chain are also types of the chained Feature.

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_variable setter that returns False on Usages without modifying is_variable.

Used in