Function SysML

class Function

Implementation of Function defined in the KerML specification.

Specification:

A Function is a Behavior that has an out parameter that is identified as its result. A Function represents the performance of a calculation that produces the values of its result parameter. This calculation may be decomposed into Expressions that are steps of the Function.

For language description, see section 7.4.8.1 of the KerML specification. For more details on the model, see section 8.3.4.7.4 of the KerML specification.

Function Function syside.Function Behavior Behavior syside.Behavior Behavior->Function Class Class syside.Class Class->Behavior Classifier Classifier syside.Classifier Classifier->Class Type Type syside.Type Type->Classifier Namespace Namespace syside.Namespace Namespace->Type Element Element syside.Element Element->Namespace AstNode AstNode syside.AstNode AstNode->Element
Children
Members defined in Function (7 members)

STD

R

any_result

R

result that also considers specialized Functions.

expressions

R

The Expressions that are steps in the calculation of the result of this Function.

is_model_level_evaluable

R

Whether this Function can be used as the function of a model-level evaluable InvocationExpression. Certain Functions from the Kernel Functions Library are considered to have is_model_level_evaluable = true. For all other Functions it is false.

result

R

The object or value that is the result of evaluating the Function.

result_expression

R

The result expression of this Function owned by ResultExpressionMembership.

result_expression_member

R

SysIDE specific accessor for manipulating result_expression.

Members inherited from Behavior (2 members)

parameters

R

The parameters of this Behavior, which are defined as its directed_features, whose values are passed into and/or out of a performance of the Behavior.

steps

R

The Steps that make up this Behavior.

Members inherited from Class (0 members)
Members inherited from Classifier (2 members)

owned_subclassification_types

R

The Classifiers related to this Classifier by owned_subclassifications.

owned_subclassifications

R

The owned_specializations of this Classifier that are Subclassifications, for which this Classifier is the subclassifier.

Members inherited from Type (36 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

The interpretations of a Type with differencing_types are asserted to be those of the first of those Types, but not including those of the remaining Types. For example, a Classifier might be the difference of a Classifier for 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 a Classifier for people of a particular sex, identifying their children not of that sex (because the interpretations of the children Feature that identify those of that sex are also interpretations of the Classifier for that sex).

directed_features

R

The features of this Type that have a non-null direction.

disjoining_types

R

The types that related to this Type through owned_disjoinings.

end_features

R

All features of this Type with is_end = true.

feature_memberships

R

The FeatureMemberships for features of this Type, which include all owned_feature_memberships and those inherited_memberships that are FeatureMemberships (but does not include any imported_memberships).

features

R

The owned_member_features of the feature_memberships of this Type.

heritage

R

The specializations and conjugations owned by this Type.

inherited_features

R

All the member_features of the inherited_memberships of this Type that are FeatureMemberships.

inherited_memberships

R

All Memberships inherited by this Type via Specialization or Conjugation. These are included in the derived union for the memberships of the Type.

inputs

R

All features related to this Type by FeatureMemberships that have direction in or inout.

intersecting_types

R

The interpretations of a Type with intersecting_types are asserted to be those in common among the intersecting_types, which are the Types derived from the intersecting_type of the owned_intersectings of this Type. For example, a Classifier might be an intersection of Classifiers for 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 a Feature for their children and a Classifier for people of that sex (because the interpretations of the children Feature that identify those of that sex are also interpretations of the Classifier for that sex).

is_abstract

RW

Indicates whether instances of this Type must also be instances of at least one of its specialized Types.

is_conjugated

R

Indicates whether this Type has an owned_conjugator.

is_sufficient

RW

Whether all things that meet the classification conditions of this Type must be classified by the Type.

is_sufficient_explicitly

R

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

multiplicity

R

An owned_member of this Type that is a Multiplicity, which constraints the cardinality of the Type. If there is no such owned_member, then the cardinality of this Type is constrained by all the Multiplicity constraints applicable to any direct supertypes.

outputs

R

All features related to this Type by FeatureMemberships that have direction out or inout.

owned_conjugator

R

A Conjugation owned by this Type for which the Type is the original_type.

owned_differencings

R

The owned_relationships of this Type that are Differencings, having this Type as their type_differenced.

owned_directed_features

R

The directed_features that are owned by this Type.

owned_disjoinings

R

The owned_relationships of this Type that are Disjoinings, for which the Type is the type_disjoined Type.

owned_end_features

R

All end_features of this Type that are owned_features.

owned_feature_memberships

R

The owned_memberships of this Type that are FeatureMemberships, for which the Type is the owning_type. Each such FeatureMembership identifies an owned_feature of the Type.

owned_features

R

The owned_member_features of the owned_feature_memberships of this Type.

owned_inputs

R

The inputs that are owned by this Type.

owned_intersectings

R

The owned_relationships of this Type that are Intersectings, have the Type as their type_intersected.

owned_outputs

R

The outputs that are owned by this Type.

owned_specializations

R

The owned_relationships of this Type that are Specializations, for which the Type is the specific Type.

owned_unionings

R

The owned_relationships of this Type that are Unionings, having the Type as their type_unioned.

type_relationships

R

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

unioning_types

R

The interpretations of a Type with unioning_types are asserted to be the same as those of all the unioning_types together, which are the Types derived from the unioning_type of the owned_unionings of this Type. For example, a Classifier for people might be the union of Classifiers for 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.

conforms

direction_of

specializes

Members inherited from Namespace (10 members)

children

R

The elements enclosed by curly brackets in textual syntax.

members

R

The set of all member Elements of this Namespace, which are the member_elements of all memberships of the Namespace.

memberships

R

All Memberships in this Namespace, including (at least) the union of owned_memberships and imported_memberships.

owned_imports

R

The owned_relationships of this Namespace that are Imports, for which the Namespace is the import_owning_namespace.

owned_members

R

The owned members of this Namespace, which are the owned_member_elements of the owned_memberships of the Namespace.

owned_memberships

R

The owned_relationships of this Namespace that are Memberships, for which the Namespace is the membership_owning_namespace.

prefixes

R

Metadata prefixes, prefixed with # in textual syntax.

__getitem__

get_member

get_membership

Members inherited from Element (23 members)

comments

R

The owned Comments related by owned_relationships.

declared_name

RW

The declared name of this Element.

declared_short_name

RW

An optional alternative name for the Element that is intended to be shorter or in some way more succinct than its primary name. It may act as a modeler-specified identifier for the Element, 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.

documentation

R

The Documentation owned by this Element.

element_id

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.

is_implied_included

R

Whether all necessary implied Relationships have been included in the owned_relationships of this Element. This property may be true, even if there are not actually any owned_relationships with is_implied = true, meaning that no such Relationships are actually implied for this Element. However, if it is false, then owned_relationships may not contain any implied Relationships. That is, either all required implied Relationships must be included, or none of them.

is_library_element

R

Whether this Element is contained in the ownership tree of a library model.

metadata

R

The owned metadata related by owned_relationships.

name

R

The name to be used for this Element during name resolution within its owning_namespace. This is derived using the effective_name() operation. By default, it is the same as the declared_name, but this is overridden for certain kinds of Elements to compute a name even when the declared_name is null.

owned_annotations

R

The owned_relationships of this Element that are Annotations, for which this Element is the annotated_element.

owned_elements

R

The Elements owned by this Element, derived as the owned_related_elements of the owned_relationships of this Element.

owned_relationships

R

The Relationships for which this Element is the owning_related_element.

owner

R

The owner of this Element, derived as the owning_related_element of the owning_relationship of this Element, if any.

owning_membership

R

The owning_relationship of this Element, if that Relationship is a Membership.

owning_namespace

R

The Namespace that owns this Element, which is the membership_owning_namespace of the owning_membership of this Element, if any.

owning_relationship

R

The Relationship for which this Element is an owned_related_element, if any.

qualified_name

R

The 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). The qualified_name is null if this Element has no owning_namespace or if there is not a complete ownership chain of named Namespaces from a root Namespace to this Element.

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

The short name to be used for this Element during name resolution within its owning_namespace. This is derived using the effective_short_name() operation. By default, it is the same as the declared_short_name, but this is overridden for certain kinds of Elements to compute a short_name even when the declared_name is null.

textual_representations

R

The TextualRepresentations that annotate this Element.

__str__

matches_qualified_name

Members inherited from AstNode (7 members)

cst_node

R

document

R

parent

R

__hash__

cast

isinstance

try_cast

Attributes

STD: tuple[Union[type[syside.Function], type[syside.CalculationDefinition], type[syside.ConstraintDefinition]], ...] = ()
property any_result: syside.Feature | None

result that also considers specialized Functions.

property expressions: syside.LazyIterator[syside.Expression | syside.CalculationUsage | syside.ConstraintUsage]

The Expressions that are steps in the calculation of the result of this Function.

The set of expressions that represent computational steps or parts of a system of equations within the Function.

computed_function
property is_model_level_evaluable: bool

Whether this Function can be used as the function of a model-level evaluable InvocationExpression. Certain Functions from the Kernel Functions Library are considered to have is_model_level_evaluable = true. For all other Functions it is false.

Note: See the specification of the KerML concrete syntax notation for Expressions for an identification of which library Functions are model-level evaluable.

property result: syside.Feature | None

The object or value that is the result of evaluating the Function.

The result parameter of the Function, which is owned by the Function via a ReturnParameterMembership.

computing_function
property result_expression: syside.Expression | None

The result expression of this Function owned by ResultExpressionMembership.

property result_expression_member: syside.ResultExpressionAccessor

SysIDE specific accessor for manipulating result_expression.

Used in