builder
Description
syside.experimental.builder – the high-level model construction API.
The package is one flat namespace of functions over core elements, in two groups.
Constructors – one function per keyword of the textual syntax,
new_<keyword>(new_package(),new_part_def(),new_part()and 90 more) – mirror it: nesting is owner-first, one keyword-only parameter per clause, the exclusive prefixes (abstract,variation,end) are oneprefix=argument, and the membership kind is derived from the owner’s kind.Expression templates (
literal(),ref(),op(),call(), and the Python operator aliases) are immutable values describing expression trees, with structural equality and hashing. They are instantiated into fresh model elements inside a constructor call. They are defined insyside.experimental.expressionsand re-exported here, so a constructor call needs only this import.chain()is their sibling for a feature chain (a.b) where a clause names a feature.
Reading back what a constructor wrote is the query side’s job:
syside.experimental.query.get_name(),
syside.experimental.query.get_equals() and the rest of the
get_/set_/add_/remove_ family live in
syside.experimental.query.
What the constructors edit is the abstract syntax; everything the semantic
analyser derives – resolution of textual references, implied relationships,
inherited members – is computed at load time and does not update as the tree
changes. Call resolve() after building to re-derive it: only then does a
reference that an added import or a newly created name would satisfy actually
resolve.
Locking is the caller’s responsibility, as with the low-level API: hold the
document’s lock (with model.documents[i].lock():) around builder calls when
other threads may touch the same document.
The constructors’ expression-valued parameters accept Python primitives, model
elements, feature chains, and templates built from literal / ref /
op / call / dot / sequence / select / collect, the
constants NULL / INFINITY and the Python operator aliases <, >,
<=, >=, +, -, *, / and %; op() raises
ValueError for an operator it does not cover.
Index
Classes
The arguments of a constructor call make the model invalid wherever it is placed. |
Functions
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Create |
||
Re-run semantic resolution and validation over |
Functions
- new_action_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ...) syside.ActionDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] action def <short_name> <name> :> <specializes>;.The new action definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no action definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new action definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.ActionDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_allocation_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ...) syside.AllocationDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] allocation def <short_name> <name> :> <specializes>;.The new allocation definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no allocation definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new allocation definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.AllocationDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_analysis_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.AnalysisCaseDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] analysis def <short_name> <name> :> <specializes> { <result> }.The new analysis case definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no analysis case definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new analysis case definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.AnalysisCaseDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_attribute_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., specializes: Iterable[syside.Classifier] = ...) syside.AttributeDefinition
Create
[<visibility>] [<prefix>] [#<metadata>] attribute def <short_name> <name> :> <specializes>;.The new attribute definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no attribute definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new attribute definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.AttributeDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_calc_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.CalculationDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] calc def <short_name> <name> :> <specializes> { <result> }.The new calculation definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no calculation definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new calculation definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.CalculationDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_case_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.CaseDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] case def <short_name> <name> :> <specializes> { <result> }.The new case definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no case definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new case definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.CaseDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_comment(owner: syside.Definition | syside.Package | syside.Usage, body: str, name: str | None = ..., short_name: str | None = ..., *, visibility: syside.VisibilityKind | None = ..., about: Iterable[syside.Element] = ..., locale: str | None = ...) syside.Comment
Create
[<visibility>] comment <short_name> <name> about <about> locale <locale> <body>.The new comment goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no comment can be written in their bodies. Passing one raisesTypeError.With a relationship
owner, the new comment goes inowner, through anAnnotation.ownermay not be ansyside.ActorMembership,syside.ElementFilterMembership,syside.EndFeatureMembership,syside.FeatureMembership,syside.FeatureValue,syside.FramedConcernMembership,syside.ObjectiveMembership,syside.OwningMembership,syside.ParameterMembership,syside.RequirementConstraintMembership,syside.RequirementVerificationMembership,syside.ResultExpressionMembership,syside.ReturnParameterMembership,syside.StakeholderMembership,syside.StateSubactionMembership,syside.SubjectMembership,syside.TransitionFeatureMembership,syside.VariantMembershiporsyside.ViewRenderingMembership: no comment can be written in their bodies. Passing one raisesTypeError.visibilitymay not be given for asyside.Dependency,syside.Membership,syside.MembershipExpose,syside.MembershipImport,syside.NamespaceExposeorsyside.NamespaceImportowner: no visibility indicator can be written in their bodies. Passing one raisesTypeError.A relationship
owneris an alias, an import, an expose or a dependency: the new element goes in its{ ... }body (alias A for B { /* note */ }) and annotates the relationship.- Parameters:
owner – The element to create the new comment in.
body – The comment’s text, without the
/**/delimiters.name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.about – The
aboutclause: each element becomes oneAnnotation. Left empty, the annotating element annotates the element that owns it.locale – The
localeclause, e.g."en": the language the comment’s text is written in.
- Returns:
The new
syside.Comment.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If
visibilityis not asyside.VisibilityKind.
- new_comment(owner: syside.Dependency | syside.Membership | syside.MembershipExpose | syside.MembershipImport | syside.NamespaceExpose | syside.NamespaceImport, body: str, name: str | None = ..., short_name: str | None = ..., *, visibility: None = ..., about: Iterable[syside.Element] = ..., locale: str | None = ...) syside.Comment
- new_concern_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ...) syside.ConcernDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] concern def <short_name> <name> :> <specializes>;.The new concern definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no concern definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new concern definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.ConcernDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_connection_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ...) syside.ConnectionDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] connection def <short_name> <name> :> <specializes>;.The new connection definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no connection definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new connection definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.ConnectionDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_constraint_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.ConstraintDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] constraint def <short_name> <name> :> <specializes> { <result> }.The new constraint definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no constraint definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new constraint definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.ConstraintDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition], visibility: syside.VisibilityKind | None = ..., specializes: Iterable[syside.Classifier] = ...) syside.Definition
Create
[<visibility>] [<prefix>] #<metadata> def <short_name> <name> :> <specializes>;.The new definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbeforedef. Mandatory here, and the grammar requires at least one: the prefixes are what extend the plaindef.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.Definition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.ValueError – If
metadatais empty: the grammar requires at least one.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_dependency(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., clients: Iterable[syside.Element], suppliers: Iterable[syside.Element]) syside.Dependency
Create
[<visibility>] [#<metadata>] dependency <short_name> <name> from <clients> to <suppliers>;.The new dependency goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no dependency can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new dependency in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.clients – The dependent elements, written before
to. The grammar requires at least one.suppliers – The elements the clients depend on, written after
to. The grammar requires at least one.
- Returns:
The new
syside.Dependency.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.ValueError – If
clientsis empty: the grammar requires at least one.ValueError – If
suppliersis empty: the grammar requires at least one.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_doc(owner: syside.Definition | syside.Package | syside.Usage, body: str, name: str | None = ..., short_name: str | None = ..., *, visibility: syside.VisibilityKind | None = ..., locale: str | None = ...) syside.Documentation
Create
[<visibility>] doc <short_name> <name> locale <locale> <body>.The new documentation comment goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no documentation comment can be written in their bodies. Passing one raisesTypeError.With a relationship
owner, the new documentation comment goes inowner, through anAnnotation.ownermay not be ansyside.ActorMembership,syside.ElementFilterMembership,syside.EndFeatureMembership,syside.FeatureMembership,syside.FeatureValue,syside.FramedConcernMembership,syside.ObjectiveMembership,syside.OwningMembership,syside.ParameterMembership,syside.RequirementConstraintMembership,syside.RequirementVerificationMembership,syside.ResultExpressionMembership,syside.ReturnParameterMembership,syside.StakeholderMembership,syside.StateSubactionMembership,syside.SubjectMembership,syside.TransitionFeatureMembership,syside.VariantMembershiporsyside.ViewRenderingMembership: no documentation comment can be written in their bodies. Passing one raisesTypeError.visibilitymay not be given for asyside.Dependency,syside.Membership,syside.MembershipExpose,syside.MembershipImport,syside.NamespaceExposeorsyside.NamespaceImportowner: no visibility indicator can be written in their bodies. Passing one raisesTypeError.A relationship
owneris an alias, an import, an expose or a dependency: the new element goes in its{ ... }body (alias A for B { /* note */ }) and annotates the relationship.- Parameters:
owner – The element to create the new documentation comment in.
body – The comment’s text, without the
/**/delimiters.name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.locale – The
localeclause, e.g."en": the language the comment’s text is written in.
- Returns:
The new
syside.Documentation.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If
visibilityis not asyside.VisibilityKind.
- new_doc(owner: syside.Dependency | syside.Membership | syside.MembershipExpose | syside.MembershipImport | syside.NamespaceExpose | syside.NamespaceImport, body: str, name: str | None = ..., short_name: str | None = ..., *, visibility: None = ..., locale: str | None = ...) syside.Documentation
- new_enum_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., specializes: Iterable[syside.Classifier] = ...) syside.EnumerationDefinition
Create
[<visibility>] [#<metadata>] enum def <short_name> <name> :> <specializes>;.The new enumeration definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no enumeration definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new enumeration definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.EnumerationDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_flow_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ...) syside.FlowDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] flow def <short_name> <name> :> <specializes>;.The new flow definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no flow definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new flow definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.FlowDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_interface_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ...) syside.InterfaceDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] interface def <short_name> <name> :> <specializes>;.The new interface definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no interface definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new interface definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.InterfaceDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_item_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ...) syside.ItemDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] item def <short_name> <name> :> <specializes>;.The new item definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no item definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new item definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.ItemDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_library_package(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., standard: bool = ..., filters: Iterable[syside.experimental.expressions.ExpressionLike] = ...) syside.LibraryPackage
Create
[<visibility>] [standard] library [#<metadata>] package <short_name> <name> { filter <filters>; }.The new library package goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no library package can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new library package in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.standard – The
standardprefix: the package is part of the standard library rather than a user library.filters – The
filter <expression>;members of the body: each entry is anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), and becomes oneElementFilterMembership, in the order given.
- Returns:
The new
syside.LibraryPackage– the exact kind, neverPackage(that isnew_package’s job).- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_metadata(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., defined_by: Iterable[syside.Classifier], about: Iterable[syside.Element] = ...) syside.MetadataUsage
Create
[<visibility>] [#<metadata>] metadata <short_name> <name> : <defined_by> about <about>;.The new metadata usage goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no metadata usage can be written in their bodies. Passing one raisesTypeError.With a relationship
owner, the new metadata usage goes inowner, through anAnnotation.ownermay not be ansyside.ActorMembership,syside.ElementFilterMembership,syside.EndFeatureMembership,syside.FeatureMembership,syside.FeatureValue,syside.FramedConcernMembership,syside.ObjectiveMembership,syside.OwningMembership,syside.ParameterMembership,syside.RequirementConstraintMembership,syside.RequirementVerificationMembership,syside.ResultExpressionMembership,syside.ReturnParameterMembership,syside.StakeholderMembership,syside.StateSubactionMembership,syside.SubjectMembership,syside.TransitionFeatureMembership,syside.VariantMembershiporsyside.ViewRenderingMembership: no metadata usage can be written in their bodies. Passing one raisesTypeError.visibilitymay not be given for asyside.Dependency,syside.Membership,syside.MembershipExpose,syside.MembershipImport,syside.NamespaceExposeorsyside.NamespaceImportowner: no visibility indicator can be written in their bodies. Passing one raisesTypeError.A relationship
owneris an alias, an import, an expose or a dependency: the new element goes in its{ ... }body (alias A for B { /* note */ }) and annotates the relationship.- Parameters:
owner – The element to create the new metadata usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping. Mandatory here – a metadata usage says which metadata definition it is an instance of.about – The
aboutclause: each element becomes oneAnnotation. Left empty, the annotating element annotates the element that owns it.
- Returns:
The new
syside.MetadataUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).
- new_metadata(owner: syside.Dependency | syside.Membership | syside.MembershipExpose | syside.MembershipImport | syside.NamespaceExpose | syside.NamespaceImport, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: None = ..., defined_by: Iterable[syside.Classifier], about: Iterable[syside.Element] = ...) syside.MetadataUsage
- new_metadata_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., specializes: Iterable[syside.Classifier] = ...) syside.MetadataDefinition
Create
[<visibility>] [<prefix>] [#<metadata>] metadata def <short_name> <name> :> <specializes>;.The new metadata definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no metadata definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new metadata definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.MetadataDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_occurrence_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ...) syside.OccurrenceDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] occurrence def <short_name> <name> :> <specializes>;.The new occurrence definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no occurrence definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new occurrence definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.OccurrenceDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_package(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., filters: Iterable[syside.experimental.expressions.ExpressionLike] = ...) syside.Package
Create
[<visibility>] [#<metadata>] package <short_name> <name> { filter <filters>; }insideowner.The new package goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no package can be written in their bodies. Passing one raisesTypeError.Both names are optional, as they are in the textual syntax.
- Parameters:
owner – The element to create the new package in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.filters – The
filter <expression>;members of the body: each entry is anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), and becomes oneElementFilterMembership, in the order given.
- Returns:
The new
syside.Package– the exact kind, neverLibraryPackage(that isnew_library_package’s job).- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_part_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ...) syside.PartDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] part def <short_name> <name> :> <specializes>;.The new part definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no part definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new part definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.PartDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_port_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., specializes: Iterable[syside.Classifier] = ...) syside.PortDefinition
Create
[<visibility>] [<prefix>] [#<metadata>] port def <short_name> <name> :> <specializes>;.The new port definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no port definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new port definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.PortDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_rendering_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ...) syside.RenderingDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] rendering def <short_name> <name> :> <specializes>;.The new rendering definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no rendering definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new rendering definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.RenderingDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_rep(owner: syside.Definition | syside.Package | syside.Usage, body: str, name: str | None = ..., short_name: str | None = ..., *, language: str, visibility: syside.VisibilityKind | None = ...) syside.TextualRepresentation
Create
[<visibility>] rep <short_name> <name> language <language> <body>.The new textual representation goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no textual representation can be written in their bodies. Passing one raisesTypeError.With a relationship
owner, the new textual representation goes inowner, through anAnnotation.ownermay not be ansyside.ActorMembership,syside.ElementFilterMembership,syside.EndFeatureMembership,syside.FeatureMembership,syside.FeatureValue,syside.FramedConcernMembership,syside.ObjectiveMembership,syside.OwningMembership,syside.ParameterMembership,syside.RequirementConstraintMembership,syside.RequirementVerificationMembership,syside.ResultExpressionMembership,syside.ReturnParameterMembership,syside.StakeholderMembership,syside.StateSubactionMembership,syside.SubjectMembership,syside.TransitionFeatureMembership,syside.VariantMembershiporsyside.ViewRenderingMembership: no textual representation can be written in their bodies. Passing one raisesTypeError.visibilitymay not be given for asyside.Dependency,syside.Membership,syside.MembershipExpose,syside.MembershipImport,syside.NamespaceExposeorsyside.NamespaceImportowner: no visibility indicator can be written in their bodies. Passing one raisesTypeError.A relationship
owneris an alias, an import, an expose or a dependency: the new element goes in its{ ... }body (alias A for B { /* note */ }) and annotates the relationship.- Parameters:
owner – The element to create the new textual representation in.
body – The represented text, without the
/**/delimiters.name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.language – The
languageclause, e.g."kerml": the language the represented text is written in.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.
- Returns:
The new
syside.TextualRepresentation.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If
visibilityis not asyside.VisibilityKind.
- new_rep(owner: syside.Dependency | syside.Membership | syside.MembershipExpose | syside.MembershipImport | syside.NamespaceExpose | syside.NamespaceImport, body: str, name: str | None = ..., short_name: str | None = ..., *, language: str, visibility: None = ...) syside.TextualRepresentation
- new_requirement_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ...) syside.RequirementDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] requirement def <short_name> <name> :> <specializes>;.The new requirement definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no requirement definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new requirement definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.RequirementDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_state_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ..., parallel: bool = ...) syside.StateDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] state def <short_name> <name> :> <specializes> [parallel { }].The new state definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no state definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new state definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.parallel – The
parallelkeyword before the body: the states in the body are performed concurrently, where otherwise at most one of them is performed at a time, and no transition is allowed between them (SysML 7.18.2). The keyword is written with a body,state s parallel { }.
- Returns:
The new
syside.StateDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_use_case_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.UseCaseDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] use case def <short_name> <name> :> <specializes> { <result> }.The new use case definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no use case definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new use case definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.UseCaseDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_verification_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.VerificationCaseDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] verification def <short_name> <name> :> <specializes> { <result> }.The new verification case definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no verification case definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new verification case definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.VerificationCaseDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_view_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ..., filters: Iterable[syside.experimental.expressions.ExpressionLike] = ...) syside.ViewDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] view def <short_name> <name> :> <specializes> { filter <filters>; }.The new view definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no view definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new view definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.filters – The
filter <expression>;members of the body, which select among the elements the view exposes: each entry is anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), and becomes oneElementFilterMembership, in the order given.
- Returns:
The new
syside.ViewDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_viewpoint_def(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., individual: bool = ..., specializes: Iterable[syside.Classifier] = ...) syside.ViewpointDefinition
Create
[<visibility>] [<prefix>] [individual] [#<metadata>] viewpoint def <short_name> <name> :> <specializes>;.The new viewpoint definition goes in
owner, through anOwningMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no viewpoint definition can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new viewpoint definition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.individual – The
individualprefix: the definition classifies the life of a single individual, so it has at most one instance (SysML 8.3.9.3). It is still a definition, and can be specialized and typed by.specializes – The
:>/specializesclause: each classifier becomes oneSubclassification.
- Returns:
The new
syside.ViewpointDefinition.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.
- new_attribute(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.AttributeUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [#<metadata>] attribute <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new attribute usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no attribute usage can be written in their bodies. Passing one raisesTypeError.Note the Python evaluation trap on
equals:equals=literal(2) * 2builds a multiplication template, butequals=2 * 2passes the integer4, because Python evaluates it before this function is called.With
variant=True, the new variant attribute usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant attribute usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return attribute usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return attribute usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end attribute usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end attribute usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new attribute usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant attribute ...;: the new attribute usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new attribute usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn attribute ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.AttributeUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_attribute(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.AttributeUsage
- new_attribute(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.AttributeUsage
- new_attribute(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.AttributeUsage
- new_binding(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., ref: bool = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., source: syside.Feature, source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature, target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ...) syside.BindingConnectorAsUsage
Create
[<visibility>] [<direction>] [derived] [<prefix>] [ref] [#<metadata>] binding <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] bind <source_multiplicity> <source_name> ::> <source> = <target_multiplicity> <target_name> ::> <target>;.The new binding goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no binding can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new binding in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.source – The feature the binding runs from, written after
bind. It keeps its own owner: the new end references it.source_multiplicity – The multiplicity of the source end,
[1], built bybounds(). Needssource=.source_name – The declared name of the source end, written before
::>. Needssource=.target – The feature the binding runs to, written after
=. It keeps its own owner: the new end references it.target_multiplicity – The multiplicity of the target end,
[1], built bybounds(). Needstarget=.target_name – The declared name of the target end, written before
::>. Needstarget=.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.
- Returns:
The new
syside.BindingConnectorAsUsage.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
source_multiplicityis not a template built bybounds().TypeError – If
target_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_enum(owner: syside.Definition | syside.EnumerationDefinition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, member: None = ..., prefix: None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.EnumerationUsage
Create
[<visibility>] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [#<metadata>] enum <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new enumeration usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipVariantMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no enumeration usage can be written in their bodies. Passing one raisesTypeError.metadatamay not be given for ansyside.EnumerationDefinitionowner: no metadata prefix can be written in its body. Passing one raisesTypeError.directionmay not be given for ansyside.EnumerationDefinitionowner: no direction can be written in its body. Passing one raisesTypeError.In an enumeration definition the usage is one of the definition’s enumerated values, held in a
VariantMembership. Anywhere else it is an ordinary usage typed by an enumeration.With
member="return", the new return enumeration usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return enumeration usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="abstract", the new abstract enumeration usage goes inowner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no abstract enumeration usage can be written in their bodies. Passing one raisesTypeError.In an enumeration definition the usage is one of the definition’s enumerated values, held in a
VariantMembership. Anywhere else it is an ordinary usage typed by an enumeration.With
prefix="end", the new end enumeration usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end enumeration usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new enumeration usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.member – The dedicated member position, if any – a membership kind of its own for the same new enumeration usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn enum ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.EnumerationUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_enum(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, member: None = ..., prefix: typing.Literal[abstract], metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.EnumerationUsage
- new_enum(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.EnumerationUsage
- new_enum(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, member: typing.Literal[return], prefix: typing.Literal[abstract, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.EnumerationUsage
- new_ref(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ReferenceUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] ref <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new reference usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no reference usage can be written in their bodies. Passing one raisesTypeError.visibilitymay not be given for asyside.MetadataUsageowner: no visibility indicator can be written in its body. Passing one raisesTypeError.With
variant=True, the new variant reference usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant reference usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return reference usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return reference usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
member="variable", the new loop variable goes inowner, through aFeatureMembership.visibilitymay not be given for asyside.ForLoopActionUsageowner: no visibility indicator can be written in its body. Passing one raisesTypeError.directionmay not be given with member=”variable”: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given with member=”variable”: the grammar writes no derived prefix there. Passing one raisesTypeError.constantmay not be given with member=”variable”: the grammar writes no constant prefix there. Passing one raisesTypeError.crossesmay not be given with member=”variable”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a loop variable is not an end. Passing one raisesTypeError.equalsmay not be given with member=”variable”: the grammar writes no value there. Passing one raisesTypeError.defaultmay not be given with member=”variable”: the grammar writes no default keyword there. Passing one raisesTypeError.initialmay not be given with member=”variable”: the grammar writes no initial value there. Passing one raisesTypeError.new_ref(loop, "i", defined_by=[T], member="variable")declares the loop variable:for i : T in s { ... }. A for loop has one, so the call replaces the variable the loop was created with, and that variable leaves the model: declare the variable before building anything that refers to it, and do not pass the replaced one to a later call.The call is refused with
ValueError, and nothing is changed, while an argument or the model refers to the element being replaced or to an element it owns: the reference would be left without a target.With
prefix="end", the new end reference usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end reference usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new reference usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant ref ...;: the new reference usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new reference usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn ref ...;member form, under aReturnParameterMembership."variable": the loop variable ofowner, replacing what the slot holds, under aFeatureMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.ReferenceUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_ref(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ReferenceUsage
- new_ref(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ReferenceUsage
- new_ref(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ReferenceUsage
- new_ref(owner: syside.ForLoopActionUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[variable], prefix: None = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: typing.Literal[False] = ..., constant: typing.Literal[False] = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: None = ..., default: typing.Literal[False] = ..., initial: typing.Literal[False] = ...) syside.ReferenceUsage
- new_succession(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., ref: bool = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., source: syside.Feature, source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature, target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ...) syside.SuccessionAsUsage
Create
[<visibility>] [<direction>] [derived] [<prefix>] [ref] [#<metadata>] succession <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] first <source_multiplicity> <source_name> ::> <source> then <target_multiplicity> <target_name> ::> <target>;.The new succession goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no succession can be written in their bodies. Passing one raisesTypeError.Both ends reference features that keep their own owners; what the succession owns is the two anonymous end features that subset them.
sourceandtargetare positional in the model – the first and second declared end – which is howfirst a then bkeeps its direction.- Parameters:
owner – The element to create the new succession in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.source – The feature the succession runs from, written after
first. It keeps its own owner: the new end references it.source_multiplicity – The multiplicity of the source end,
[1], built bybounds(). Needssource=.source_name – The declared name of the source end, written before
::>. Needssource=.target – The feature the succession runs to, written after
then. It keeps its own owner: the new end references it.target_multiplicity – The multiplicity of the target end,
[1], built bybounds(). Needstarget=.target_name – The declared name of the target end, written before
::>. Needstarget=.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.
- Returns:
The new
syside.SuccessionAsUsage.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
source_multiplicityis not a template built bybounds().TypeError – If
target_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_usage(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, member: None = ..., prefix: typing.Literal[abstract, variation] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition], visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., ref: bool = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.Usage
Create
[<visibility>] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] #<metadata> <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.InterfaceDefinition,syside.InterfaceUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no usage can be written in their bodies. Passing one raisesTypeError.With
member="return", the new return usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.InterfaceDefinition,syside.InterfaceUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.member – The dedicated member position, if any – a membership kind of its own for the same new usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the name. Mandatory here, and the grammar requires at least one: the prefixes are the extended usage’s keyword.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.Usage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.ValueError – If
metadatais empty: the grammar requires at least one.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_usage(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition], visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., ref: Literal[False] = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.Usage
- new_usage(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition], visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., ref: bool = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.Usage
- new_allocation(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., source: syside.Feature | None = ..., source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature | None = ..., target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ...) syside.AllocationUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] allocation <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] allocate <source_multiplicity> <source_name> ::> <source> to <target_multiplicity> <target_name> ::> <target>;.The new allocation usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no allocation usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant allocation usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant allocation usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return allocation usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return allocation usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end allocation usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end allocation usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new allocation usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant allocation ...;: the new allocation usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new allocation usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn allocation ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.source – The feature the allocation runs from, written after
allocate. It keeps its own owner: the new end references it.source_multiplicity – The multiplicity of the source end,
[1], built bybounds(). Needssource=.source_name – The declared name of the source end, written before
::>. Needssource=.target – The feature the allocation runs to, written after
to. It keeps its own owner: the new end references it.target_multiplicity – The multiplicity of the target end,
[1], built bybounds(). Needstarget=.target_name – The declared name of the target end, written before
::>. Needstarget=.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.
- Returns:
The new
syside.AllocationUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).ValueError – If
source_multiplicityorsource_nameis given withoutsource: they describe that end.ValueError – If
target_multiplicityortarget_nameis given withouttarget: they describe that end.ValueError – If one of
sourceandtargetis given without the other: the grammar writes both ends or neither.TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
source_multiplicityis not a template built bybounds().TypeError – If
target_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_allocation(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., source: syside.Feature | None = ..., source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature | None = ..., target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ...) syside.AllocationUsage
- new_allocation(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., source: syside.Feature | None = ..., source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature | None = ..., target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ...) syside.AllocationUsage
- new_allocation(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., source: syside.Feature | None = ..., source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature | None = ..., target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ...) syside.AllocationUsage
- new_connection(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., source: syside.Feature | None = ..., source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature | None = ..., target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., ends: Sequence[syside.experimental.expressions.ConnectorEndTemplate] | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ConnectionUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] connection <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> connect <source_multiplicity> <source_name> ::> <source> to <target_multiplicity> <target_name> ::> <target>;.The new connection usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no connection usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant connection usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant connection usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return connection usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return connection usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end connection usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end connection usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new connection usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant connection ...;: the new connection usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new connection usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn connection ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.source – The feature the connector runs from, written after
connect. It keeps its own owner: the new end references it.source_multiplicity – The multiplicity of the source end,
[1], built bybounds(). Needssource=.source_name – The declared name of the source end, written before
::>. Needssource=.target – The feature the connector runs to, written after
to. It keeps its own owner: the new end references it.target_multiplicity – The multiplicity of the target end,
[1], built bybounds(). Needstarget=.target_name – The declared name of the target end, written before
::>. Needstarget=.ends – The n-ary form,
connect (a, b, d): two or more ends, each built byconnector_end(). The alternative tosource=/target=.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.ConnectionUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).ValueError – If
source_multiplicityorsource_nameis given withoutsource: they describe that end.ValueError – If
target_multiplicityortarget_nameis given withouttarget: they describe that end.TypeError – If
endsis given withsource,targetor their details: the n-ary and the binary clause are alternatives.ValueError – If
endslists fewer than two ends.ValueError – If one of
sourceandtargetis given without the other: the grammar writes both ends or neither.TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
source_multiplicityis not a template built bybounds().TypeError – If
target_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_connection(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., source: syside.Feature | None = ..., source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature | None = ..., target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., ends: Sequence[syside.experimental.expressions.ConnectorEndTemplate] | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ConnectionUsage
- new_connection(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., source: syside.Feature | None = ..., source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature | None = ..., target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., ends: typing.Sequence[syside.experimental.expressions.ConnectorEndTemplate] | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ConnectionUsage
- new_connection(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., source: syside.Feature | None = ..., source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature | None = ..., target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., ends: typing.Sequence[syside.experimental.expressions.ConnectorEndTemplate] | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ConnectionUsage
- new_event_occurrence(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., event_occurrence: syside.OccurrenceUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.EventOccurrenceUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [individual] [<portion>] [#<metadata>] event occurrence <short_name> <name> ::> <event_occurrence> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new event occurrence usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no event occurrence usage can be written in their bodies. Passing one raisesTypeError.There are two ways to write an event occurrence usage in the textual syntax: the declaration
event occurrence ...;, and the reference shorthandevent <event_occurrence>;, which declares no usage of its own.event_occurrence=writes the shorthand’s reference; with a name, the declaration writes it as::> <event_occurrence>. The specialization clauses combine with either.With
variant=True, the new variant event occurrence usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant event occurrence usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
member="return", the new return event occurrence usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return event occurrence usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end event occurrence usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end event occurrence usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new event occurrence usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant event occurrence ...;: the new event occurrence usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new event occurrence usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn event occurrence ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.event_occurrence – The occurrence the usage references: the reference form
event <event_occurrence>;, an alternative to declaring a usage of its own. It keeps its own owner.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.EventOccurrenceUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_event_occurrence(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., event_occurrence: syside.OccurrenceUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.EventOccurrenceUsage
- new_event_occurrence(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., event_occurrence: syside.OccurrenceUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.EventOccurrenceUsage
- new_event_occurrence(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., event_occurrence: syside.OccurrenceUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.EventOccurrenceUsage
- new_flow(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: Iterable[syside.Classifier] = ..., payload_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: syside.experimental.expressions.FeatureChainTemplate, target: syside.experimental.expressions.FeatureChainTemplate) syside.FlowUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] flow <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> of <<payload_short_name>> <payload_name> : <payload_defined_by> :> <payload_subsets> ::> <payload_references> :>> <payload_redefines> <payload_multiplicity> [ordered] [default] = <payload_equals> from <source> to <target>;.The new flow usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no flow usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant flow usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant flow usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return flow usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return flow usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end flow usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end flow usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new flow usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant flow ...;: the new flow usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new flow usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn flow ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.payload_short_name – The
<...>short name of the payload, written before its name:of <s> x : T.payload_name – The declared name of the payload, written after
of.Noneleaves the payload anonymous, theof <type>form.payload_defined_by – The payload’s
:/defined byclause: each type becomes oneFeatureTypingon the payload.of Fuelispayload_defined_by=[fuel]alone.payload_subsets – The payload’s
:>/subsetsclause: each entry becomes oneSubsettingof the payload. An entry is a feature, or achain()of two or more features standing for their feature chain.payload_references – The payload’s
::>/referencesclause: the feature becomes the oneReferenceSubsettingthe payload may own. A feature, or achain()of two or more features.payload_redefines – The payload’s
:>>/redefinesclause: each entry becomes oneRedefinitionof the payload. An entry is a feature, or achain()of two or more features standing for their feature chain.payload_multiplicity – The payload’s
[...]clause, built bybounds().payload_ordered – The
orderedkeyword on the payload: its values are ordered.payload_equals – The payload’s
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the payload’s value.Noneleaves the payload without a value.payload_default – The
defaultkeyword before the payload’s value:payload_equalsis a default value, where a plain value is fixed.flow of x : T default = v from a.o to b.i;. Needspayload_equals=. There is nopayload_initial=here::=needs a feature that may vary in time, which a flow’s payload is not (KerMLvalidateFeatureValueIsInitial), soflow of x : T := v ...is invalid wherever the flow is placed.source – The
fromend: achain()whose last feature is the flowed feature and whose others are the end’s prefix –chain(t, o, f)writesfrom t.o.f. Needstarget=.target – The
toend, assource=:chain(e, i, f)writesto e.i.f. Needssource=.
- Returns:
The new
syside.FlowUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.ValueError – If
payload_defaultis given withoutpayload_equals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).ValueError – If one of
sourceandtargetis given without the other: the grammar writes both ends or neither.ValueError – If
sourceortargetis not a chain of at least two features (SysML 2.1 7.16.2), or its last feature is no feature of the type of the feature before it (KerML 7.3.4.5).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If an entry of
payload_defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().TypeError – If
payload_multiplicityis not a template built bybounds().TypeError – If
payload_multiplicity,payload_orderedorpayload_equalsis given without a specialization of the payload (payload_defined_by,payload_subsets,payload_referencesorpayload_redefines), orpayload_short_nameorpayload_namewithout one: a payload is declared with a specialization (SysML 2.1 8.2.2.16PayloadFeature).
- new_flow(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: Iterable[syside.Classifier] = ..., payload_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: None = ..., target: None = ...) syside.FlowUsage
- new_flow(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: Iterable[syside.Classifier] = ..., payload_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: syside.experimental.expressions.FeatureChainTemplate, target: syside.experimental.expressions.FeatureChainTemplate) syside.FlowUsage
- new_flow(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: Iterable[syside.Classifier] = ..., payload_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: None = ..., target: None = ...) syside.FlowUsage
- new_flow(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: typing.Iterable[syside.Classifier] = ..., payload_subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: syside.experimental.expressions.FeatureChainTemplate, target: syside.experimental.expressions.FeatureChainTemplate) syside.FlowUsage
- new_flow(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: typing.Iterable[syside.Classifier] = ..., payload_subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: None = ..., target: None = ...) syside.FlowUsage
- new_flow(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: typing.Iterable[syside.Classifier] = ..., payload_subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: syside.experimental.expressions.FeatureChainTemplate, target: syside.experimental.expressions.FeatureChainTemplate) syside.FlowUsage
- new_flow(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: typing.Iterable[syside.Classifier] = ..., payload_subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: None = ..., target: None = ...) syside.FlowUsage
- new_interface(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., source: syside.Feature | None = ..., source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature | None = ..., target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., ends: Sequence[syside.experimental.expressions.ConnectorEndTemplate] | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.InterfaceUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] interface <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> connect <source_multiplicity> <source_name> ::> <source> to <target_multiplicity> <target_name> ::> <target>;.The new interface usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no interface usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant interface usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant interface usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return interface usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return interface usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end interface usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end interface usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new interface usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant interface ...;: the new interface usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new interface usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn interface ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.source – The port the interface runs from, written after
connect. It keeps its own owner: the new end references it.source_multiplicity – The multiplicity of the source end,
[1], built bybounds(). Needssource=.source_name – The declared name of the source end, written before
::>. Needssource=.target – The port the interface runs to, written after
to. It keeps its own owner: the new end references it.target_multiplicity – The multiplicity of the target end,
[1], built bybounds(). Needstarget=.target_name – The declared name of the target end, written before
::>. Needstarget=.ends – The n-ary form,
connect (pa, pb, pd): two or more ports’ ends, each built byconnector_end(). The alternative tosource=/target=.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.InterfaceUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).ValueError – If
source_multiplicityorsource_nameis given withoutsource: they describe that end.ValueError – If
target_multiplicityortarget_nameis given withouttarget: they describe that end.TypeError – If
endsis given withsource,targetor their details: the n-ary and the binary clause are alternatives.ValueError – If
endslists fewer than two ends.ValueError – If one of
sourceandtargetis given without the other: the grammar writes both ends or neither.TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
source_multiplicityis not a template built bybounds().TypeError – If
target_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_interface(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., source: syside.Feature | None = ..., source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature | None = ..., target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., ends: Sequence[syside.experimental.expressions.ConnectorEndTemplate] | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.InterfaceUsage
- new_interface(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., source: syside.Feature | None = ..., source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature | None = ..., target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., ends: typing.Sequence[syside.experimental.expressions.ConnectorEndTemplate] | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.InterfaceUsage
- new_interface(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., source: syside.Feature | None = ..., source_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., source_name: str | None = ..., target: syside.Feature | None = ..., target_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., target_name: str | None = ..., ends: typing.Sequence[syside.experimental.expressions.ConnectorEndTemplate] | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.InterfaceUsage
- new_item(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ItemUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] item <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new item usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no item usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant item usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant item usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return item usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return item usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end item usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end item usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new item usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant item ...;: the new item usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new item usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn item ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.ItemUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_item(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ItemUsage
- new_item(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ItemUsage
- new_item(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ItemUsage
- new_message(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: Iterable[syside.Classifier] = ..., payload_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: syside.OccurrenceUsage | syside.experimental.expressions.FeatureChainTemplate, target: syside.OccurrenceUsage | syside.experimental.expressions.FeatureChainTemplate) syside.FlowUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [constant] [ref] [individual] [<portion>] [#<metadata>] message <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> of <<payload_short_name>> <payload_name> : <payload_defined_by> :> <payload_subsets> ::> <payload_references> :>> <payload_redefines> <payload_multiplicity> [ordered] [default] = <payload_equals> from <source> to <target>;.The new flow usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no flow usage can be written in their bodies. Passing one raisesTypeError.Every message is abstract, with or without the
abstractkeyword (SysML 7.16.2), so the new flow usage is always abstract andprefix=offers no"abstract":message m;andabstract message m;are one model.With
variant=True, the new variant flow usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant flow usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return flow usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return flow usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
- Parameters:
owner – The element to create the new flow usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant message ...;: the new flow usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new flow usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn message ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.payload_short_name – The
<...>short name of the payload, written before its name:of <s> x : T.payload_name – The declared name of the payload, written after
of.Noneleaves the payload anonymous, theof <type>form.payload_defined_by – The payload’s
:/defined byclause: each type becomes oneFeatureTypingon the payload.of Fuelispayload_defined_by=[fuel]alone.payload_subsets – The payload’s
:>/subsetsclause: each entry becomes oneSubsettingof the payload. An entry is a feature, or achain()of two or more features standing for their feature chain.payload_references – The payload’s
::>/referencesclause: the feature becomes the oneReferenceSubsettingthe payload may own. A feature, or achain()of two or more features.payload_redefines – The payload’s
:>>/redefinesclause: each entry becomes oneRedefinitionof the payload. An entry is a feature, or achain()of two or more features standing for their feature chain.payload_multiplicity – The payload’s
[...]clause, built bybounds().payload_ordered – The
orderedkeyword on the payload: its values are ordered.payload_equals – The payload’s
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the payload’s value.Noneleaves the payload without a value.payload_default – The
defaultkeyword before the payload’s value:payload_equalsis a default value, where a plain value is fixed.flow of x : T default = v from a.o to b.i;. Needspayload_equals=. There is nopayload_initial=here::=needs a feature that may vary in time, which a flow’s payload is not (KerMLvalidateFeatureValueIsInitial), soflow of x : T := v ...is invalid wherever the flow is placed.source – The
fromevent: the occurrence usage it references, or achain()ending in one –chain(t, o)writesfrom t.o. Needstarget=.target – The
toevent, assource=. Needssource=.
- Returns:
The new
syside.FlowUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.ValueError – If
payload_defaultis given withoutpayload_equals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).ValueError – If one of
sourceandtargetis given without the other: the grammar writes both ends or neither.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If an entry of
payload_defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().TypeError – If
payload_multiplicityis not a template built bybounds().TypeError – If
payload_multiplicity,payload_orderedorpayload_equalsis given without a specialization of the payload (payload_defined_by,payload_subsets,payload_referencesorpayload_redefines), orpayload_short_nameorpayload_namewithout one: a payload is declared with a specialization (SysML 2.1 8.2.2.16PayloadFeature).
- new_message(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: Iterable[syside.Classifier] = ..., payload_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: None = ..., target: None = ...) syside.FlowUsage
- new_message(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[True], member: None = ..., prefix: Literal[variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: Iterable[syside.Classifier] = ..., payload_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: syside.OccurrenceUsage | syside.experimental.expressions.FeatureChainTemplate, target: syside.OccurrenceUsage | syside.experimental.expressions.FeatureChainTemplate) syside.FlowUsage
- new_message(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[True], member: None = ..., prefix: Literal[variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: Iterable[syside.Classifier] = ..., payload_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: None = ..., target: None = ...) syside.FlowUsage
- new_message(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[variation] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: typing.Iterable[syside.Classifier] = ..., payload_subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: syside.OccurrenceUsage | syside.experimental.expressions.FeatureChainTemplate, target: syside.OccurrenceUsage | syside.experimental.expressions.FeatureChainTemplate) syside.FlowUsage
- new_message(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[variation] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: typing.Iterable[syside.Classifier] = ..., payload_subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: None = ..., target: None = ...) syside.FlowUsage
- new_occurrence(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.OccurrenceUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] occurrence <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new occurrence usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no occurrence usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant occurrence usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant occurrence usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return occurrence usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return occurrence usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end occurrence usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end occurrence usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new occurrence usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant occurrence ...;: the new occurrence usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new occurrence usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn occurrence ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.OccurrenceUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_occurrence(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.OccurrenceUsage
- new_occurrence(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.OccurrenceUsage
- new_occurrence(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.OccurrenceUsage
- new_part(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PartUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] part <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new part usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no part usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant part usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant part usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return part usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return part usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end part usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end part usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new part usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant part ...;: the new part usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new part usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn part ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.PartUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_part(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PartUsage
- new_part(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PartUsage
- new_part(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PartUsage
- new_port(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PortUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] port <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new port usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no port usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant port usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant port usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return port usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return port usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end port usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end port usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new port usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant port ...;: the new port usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new port usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn port ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.PortUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_port(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PortUsage
- new_port(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PortUsage
- new_port(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PortUsage
- new_rendering(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.RenderingUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] rendering <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new rendering usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no rendering usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant rendering usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant rendering usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return rendering usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return rendering usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end rendering usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end rendering usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new rendering usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant rendering ...;: the new rendering usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new rendering usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn rendering ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.RenderingUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_rendering(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.RenderingUsage
- new_rendering(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.RenderingUsage
- new_rendering(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.RenderingUsage
- new_succession_flow(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: Iterable[syside.Classifier] = ..., payload_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: syside.experimental.expressions.FeatureChainTemplate, target: syside.experimental.expressions.FeatureChainTemplate) syside.SuccessionFlowUsage
Create
[<visibility>] [<direction>] [derived] [<prefix>] [ref] [individual] [<portion>] [#<metadata>] succession flow <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> of <<payload_short_name>> <payload_name> : <payload_defined_by> :> <payload_subsets> ::> <payload_references> :>> <payload_redefines> <payload_multiplicity> [ordered] [default] = <payload_equals> from <source> to <target>;.The new succession flow goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no succession flow can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new succession flow in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.payload_short_name – The
<...>short name of the payload, written before its name:of <s> x : T.payload_name – The declared name of the payload, written after
of.Noneleaves the payload anonymous, theof <type>form.payload_defined_by – The payload’s
:/defined byclause: each type becomes oneFeatureTypingon the payload.of Fuelispayload_defined_by=[fuel]alone.payload_subsets – The payload’s
:>/subsetsclause: each entry becomes oneSubsettingof the payload. An entry is a feature, or achain()of two or more features standing for their feature chain.payload_references – The payload’s
::>/referencesclause: the feature becomes the oneReferenceSubsettingthe payload may own. A feature, or achain()of two or more features.payload_redefines – The payload’s
:>>/redefinesclause: each entry becomes oneRedefinitionof the payload. An entry is a feature, or achain()of two or more features standing for their feature chain.payload_multiplicity – The payload’s
[...]clause, built bybounds().payload_ordered – The
orderedkeyword on the payload: its values are ordered.payload_equals – The payload’s
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the payload’s value.Noneleaves the payload without a value.payload_default – The
defaultkeyword before the payload’s value:payload_equalsis a default value, where a plain value is fixed.flow of x : T default = v from a.o to b.i;. Needspayload_equals=. There is nopayload_initial=here::=needs a feature that may vary in time, which a flow’s payload is not (KerMLvalidateFeatureValueIsInitial), soflow of x : T := v ...is invalid wherever the flow is placed.source – The
fromend: achain()whose last feature is the flowed feature and whose others are the end’s prefix –chain(t, o, f)writesfrom t.o.f. Needstarget=.target – The
toend, assource=:chain(e, i, f)writesto e.i.f. Needssource=.
- Returns:
The new
syside.SuccessionFlowUsage.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.ValueError – If
defaultorinitialis given withoutequals: each describes the value.ValueError – If
payload_defaultis given withoutpayload_equals: each describes the value.ValueError – If one of
sourceandtargetis given without the other: the grammar writes both ends or neither.ValueError – If
sourceortargetis not a chain of at least two features (SysML 2.1 7.16.2), or its last feature is no feature of the type of the feature before it (KerML 7.3.4.5).TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If an entry of
payload_defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().TypeError – If
payload_multiplicityis not a template built bybounds().TypeError – If
payload_multiplicity,payload_orderedorpayload_equalsis given without a specialization of the payload (payload_defined_by,payload_subsets,payload_referencesorpayload_redefines), orpayload_short_nameorpayload_namewithout one: a payload is declared with a specialization (SysML 2.1 8.2.2.16PayloadFeature).
- new_succession_flow(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: Iterable[syside.Classifier] = ..., payload_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., source: None = ..., target: None = ...) syside.SuccessionFlowUsage
- new_view(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., filters: Iterable[syside.experimental.expressions.ExpressionLike] = ...) syside.ViewUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] view <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> { filter <filters>; }.The new view usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no view usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant view usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant view usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return view usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return view usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end view usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end view usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new view usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant view ...;: the new view usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new view usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn view ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.filters – The
filter <expression>;members of the body, which select among the elements the view exposes: each entry is anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), and becomes oneElementFilterMembership, in the order given.
- Returns:
The new
syside.ViewUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_view(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., filters: Iterable[syside.experimental.expressions.ExpressionLike] = ...) syside.ViewUsage
- new_view(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., filters: typing.Iterable[syside.experimental.expressions.ExpressionLike] = ...) syside.ViewUsage
- new_view(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., filters: typing.Iterable[syside.experimental.expressions.ExpressionLike] = ...) syside.ViewUsage
- new_action(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ActionUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] action <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new action usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no action usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant action usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant action usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return action usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return action usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
member="then", the new then body goes inowner, through aParameterMembership.metadatamay not be given with member=”then”: the grammar writes no metadata prefix there. Passing one raisesTypeError.visibilitymay not be given for ansyside.IfActionUsageowner: no visibility indicator can be written in its body. Passing one raisesTypeError.directionmay not be given with member=”then”: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given with member=”then”: the grammar writes no derived prefix there. Passing one raisesTypeError.constantmay not be given with member=”then”: the grammar writes no constant prefix there. Passing one raisesTypeError.individualmay not be given with member=”then”: the grammar writes no individual prefix there. Passing one raisesTypeError.refmay not be given with member=”then”: the grammar writes no ref prefix there. Passing one raisesTypeError.portionmay not be given with member=”then”: the grammar writes no portion prefix there. Passing one raisesTypeError.crossesmay not be given with member=”then”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a then body is not an end. Passing one raisesTypeError.equalsmay not be given with member=”then”: the grammar writes no value there. Passing one raisesTypeError.defaultmay not be given with member=”then”: the grammar writes no default keyword there. Passing one raisesTypeError.initialmay not be given with member=”then”: the grammar writes no initial value there. Passing one raisesTypeError.new_action(if_action, "t", defined_by=[AD], member="then")declares thethenbody:if c action t : AD { ... }. An if action has one, so the call replaces the body the action was created with, members included, and that body leaves the model: pass neither it nor a member of it to a later call. The new body’s members are built with the ordinary constructors, taking the returned action asowner.The call is refused with
ValueError, and nothing is changed, while an argument or the model refers to the element being replaced or to an element it owns: the reference would be left without a target.With
member="else", the new else body goes inowner, through aParameterMembership.metadatamay not be given with member=”else”: the grammar writes no metadata prefix there. Passing one raisesTypeError.visibilitymay not be given for ansyside.IfActionUsageowner: no visibility indicator can be written in its body. Passing one raisesTypeError.directionmay not be given with member=”else”: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given with member=”else”: the grammar writes no derived prefix there. Passing one raisesTypeError.constantmay not be given with member=”else”: the grammar writes no constant prefix there. Passing one raisesTypeError.individualmay not be given with member=”else”: the grammar writes no individual prefix there. Passing one raisesTypeError.refmay not be given with member=”else”: the grammar writes no ref prefix there. Passing one raisesTypeError.portionmay not be given with member=”else”: the grammar writes no portion prefix there. Passing one raisesTypeError.crossesmay not be given with member=”else”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and an else body is not an end. Passing one raisesTypeError.equalsmay not be given with member=”else”: the grammar writes no value there. Passing one raisesTypeError.defaultmay not be given with member=”else”: the grammar writes no default keyword there. Passing one raisesTypeError.initialmay not be given with member=”else”: the grammar writes no initial value there. Passing one raisesTypeError.new_action(if_action, "e", member="else")declares theelsebody:if c { ... } else action e { ... }. An if action has oneelseslot, so the call replaces whatever the slot held – an else body, or an else-if – members included, and that element leaves the model: pass neither it nor a member of it to a later call. The new body’s members are built with the ordinary constructors, taking the returned action asowner.The call is refused with
ValueError, and nothing is changed, while an argument or the model refers to the element being replaced or to an element it owns: the reference would be left without a target.With
member="body", the new loop body goes inowner, through aParameterMembership.metadatamay not be given with member=”body”: the grammar writes no metadata prefix there. Passing one raisesTypeError.visibilitymay not be given for asyside.ForLoopActionUsageorsyside.WhileLoopActionUsageowner: no visibility indicator can be written in their bodies. Passing one raisesTypeError.directionmay not be given with member=”body”: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given with member=”body”: the grammar writes no derived prefix there. Passing one raisesTypeError.constantmay not be given with member=”body”: the grammar writes no constant prefix there. Passing one raisesTypeError.individualmay not be given with member=”body”: the grammar writes no individual prefix there. Passing one raisesTypeError.refmay not be given with member=”body”: the grammar writes no ref prefix there. Passing one raisesTypeError.portionmay not be given with member=”body”: the grammar writes no portion prefix there. Passing one raisesTypeError.crossesmay not be given with member=”body”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a loop body is not an end. Passing one raisesTypeError.equalsmay not be given with member=”body”: the grammar writes no value there. Passing one raisesTypeError.defaultmay not be given with member=”body”: the grammar writes no default keyword there. Passing one raisesTypeError.initialmay not be given with member=”body”: the grammar writes no initial value there. Passing one raisesTypeError.new_action(loop, "b", member="body")declares the body of awhile,looporfor:while c action b { ... },for i in s action b { ... }. A loop has one body, so the call replaces the body the loop was created with, members included, and that body leaves the model: pass neither it nor a member of it to a later call. The new body’s members are built with the ordinary constructors, taking the returned action asowner.The call is refused with
ValueError, and nothing is changed, while an argument or the model refers to the element being replaced or to an element it owns: the reference would be left without a target.With
prefix="end", the new end action usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end action usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new action usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant action ...;: the new action usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new action usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn action ...;member form, under aReturnParameterMembership."then": the then body ofowner, replacing what the slot holds, under aParameterMembership."else": the else body ofowner, replacing what the slot holds, under aParameterMembership."body": the loop body ofowner, replacing what the slot holds, under aParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.ActionUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_action(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ActionUsage
- new_action(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ActionUsage
- new_action(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ActionUsage
- new_action(owner: syside.IfActionUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[then, else], prefix: None = ..., metadata: tuple[] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: typing.Literal[False] = ..., constant: typing.Literal[False] = ..., individual: typing.Literal[False] = ..., ref: typing.Literal[False] = ..., portion: None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: None = ..., default: typing.Literal[False] = ..., initial: typing.Literal[False] = ...) syside.ActionUsage
- new_action(owner: syside.ForLoopActionUsage | syside.WhileLoopActionUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[body], prefix: None = ..., metadata: tuple[] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: typing.Literal[False] = ..., constant: typing.Literal[False] = ..., individual: typing.Literal[False] = ..., ref: typing.Literal[False] = ..., portion: None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: None = ..., default: typing.Literal[False] = ..., initial: typing.Literal[False] = ...) syside.ActionUsage
- new_analysis(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.AnalysisCaseUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] analysis <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> { <result> }.The new analysis case usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no analysis case usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant analysis case usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant analysis case usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return analysis case usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return analysis case usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end analysis case usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end analysis case usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new analysis case usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant analysis ...;: the new analysis case usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new analysis case usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn analysis ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.AnalysisCaseUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If both
equalsandresultare given: a value and a result expression together have no stated meaning.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_analysis(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.AnalysisCaseUsage
- new_analysis(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.AnalysisCaseUsage
- new_analysis(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.AnalysisCaseUsage
- new_assert_constraint(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., asserted_constraint: syside.ConstraintUsage | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., negated: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.AssertConstraintUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] assert [not] constraint <short_name> <name> ::> <asserted_constraint> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> { <result> }.The new assert constraint usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no assert constraint usage can be written in their bodies. Passing one raisesTypeError.There are two ways to write an assert constraint usage in the textual syntax: the declaration
assert constraint ...;, and the reference shorthandassert <asserted_constraint>;, which declares no usage of its own.asserted_constraint=writes the shorthand’s reference; with a name, the declaration writes it as::> <asserted_constraint>. The specialization clauses combine with either.With
variant=True, the new variant assert constraint usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant assert constraint usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
member="return", the new return assert constraint usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return assert constraint usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end assert constraint usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end assert constraint usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new assert constraint usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant assert constraint ...;: the new assert constraint usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new assert constraint usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn assert constraint ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.asserted_constraint – The constraint usage the usage references: the reference form
assert <asserted_constraint>;, an alternative to declaring a constraint usage of its own. It keeps its own owner. Achain()must end in a constraint usage (validateAssertConstraintUsageReference).multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.negated – The
notkeyword: the usage asserts that the constraint or requirement is false rather than true.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.AssertConstraintUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If both
equalsandresultare given: a value and a result expression together have no stated meaning.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).ValueError – If
asserted_constraintis a chain whose last feature is no ConstraintUsage (validateAssertConstraintUsageReference).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_assert_constraint(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., asserted_constraint: syside.ConstraintUsage | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., negated: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.AssertConstraintUsage
- new_assert_constraint(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., asserted_constraint: syside.ConstraintUsage | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., negated: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.AssertConstraintUsage
- new_assert_constraint(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., asserted_constraint: syside.ConstraintUsage | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., negated: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.AssertConstraintUsage
- new_calc(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.CalculationUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] calc <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> { <result> }.The new calculation usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no calculation usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant calculation usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant calculation usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return calculation usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return calculation usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end calculation usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end calculation usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new calculation usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant calc ...;: the new calculation usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new calculation usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn calc ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.CalculationUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If both
equalsandresultare given: a value and a result expression together have no stated meaning.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_calc(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.CalculationUsage
- new_calc(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.CalculationUsage
- new_calc(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.CalculationUsage
- new_case(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.CaseUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] case <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> { <result> }.The new case usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no case usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant case usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant case usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return case usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return case usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end case usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end case usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new case usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant case ...;: the new case usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new case usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn case ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.CaseUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If both
equalsandresultare given: a value and a result expression together have no stated meaning.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_case(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.CaseUsage
- new_case(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.CaseUsage
- new_case(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.CaseUsage
- new_concern(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ConcernUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] concern <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new concern usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no concern usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant concern usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant concern usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return concern usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return concern usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end concern usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end concern usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new concern usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant concern ...;: the new concern usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new concern usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn concern ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.ConcernUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_concern(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ConcernUsage
- new_concern(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ConcernUsage
- new_concern(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ConcernUsage
- new_constraint(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.ConstraintUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] constraint <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> { <result> }.The new constraint usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no constraint usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant constraint usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant constraint usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return constraint usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return constraint usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end constraint usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end constraint usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new constraint usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant constraint ...;: the new constraint usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new constraint usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn constraint ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.ConstraintUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If both
equalsandresultare given: a value and a result expression together have no stated meaning.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_constraint(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.ConstraintUsage
- new_constraint(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.ConstraintUsage
- new_constraint(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.ConstraintUsage
- new_exhibit_state(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., exhibited_state: syside.StateUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., parallel: bool = ...) syside.ExhibitStateUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [individual] [<portion>] [#<metadata>] exhibit state <short_name> <name> ::> <exhibited_state> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> [parallel { }].The new exhibit state usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no exhibit state usage can be written in their bodies. Passing one raisesTypeError.There are two ways to write an exhibit state usage in the textual syntax: the declaration
exhibit state ...;, and the reference shorthandexhibit <exhibited_state>;, which declares no usage of its own.exhibited_state=writes the shorthand’s reference; with a name, the declaration writes it as::> <exhibited_state>. The specialization clauses combine with either.With
variant=True, the new variant exhibit state usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant exhibit state usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
member="return", the new return exhibit state usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return exhibit state usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end exhibit state usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end exhibit state usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new exhibit state usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant exhibit state ...;: the new exhibit state usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new exhibit state usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn exhibit state ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.exhibited_state – The state the usage references: the reference form
exhibit <exhibited_state>;, an alternative to declaring a usage of its own. It keeps its own owner.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.parallel – The
parallelkeyword before the body: the states in the body are performed concurrently, where otherwise at most one of them is performed at a time, and no transition is allowed between them (SysML 7.18.2). The keyword is written with a body,state s parallel { }.
- Returns:
The new
syside.ExhibitStateUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_exhibit_state(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., exhibited_state: syside.StateUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., parallel: bool = ...) syside.ExhibitStateUsage
- new_exhibit_state(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., exhibited_state: syside.StateUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., parallel: bool = ...) syside.ExhibitStateUsage
- new_exhibit_state(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., exhibited_state: syside.StateUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., parallel: bool = ...) syside.ExhibitStateUsage
- new_guarded_succession(owner: syside.ActionDefinition | syside.ActionUsage, name: str | None = ..., short_name: str | None = ..., *, visibility: syside.VisibilityKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., source: syside.ActionUsage, guard: syside.experimental.expressions.ExpressionLike, target: syside.ActionUsage) syside.TransitionUsage
Create
[<visibility>] succession <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] first <source> if <guard> then <target>;.The new guarded succession goes in
owner, through aFeatureMembership.ownermay not be ansyside.ExhibitStateUsage,syside.FlowDefinition,syside.FlowUsage,syside.ForLoopActionUsage,syside.IfActionUsage,syside.StateDefinition,syside.StateUsage,syside.SuccessionFlowUsageorsyside.WhileLoopActionUsage: no guarded succession can be written in their bodies. Passing one raisesTypeError.sourceandtargetname features that keep their own owners. What the succession owns is the guard expression and the succession between them, whose second end referencestarget.- Parameters:
owner – The element to create the new guarded succession in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.source – The action or state the transition runs from, written after
first. It keeps its own owner: the transition references it.syside.ActionUsageis a curated narrowing: the grammar admits any feature here, and the metamodel types the property as an action.guard – The condition written after
if: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the succession’s guard expression. Mandatory here – an unguarded succession in an action body isnew_succession’s, a different element-kind.target – The action or state the transition runs to, written after
then. It keeps its own owner: the transition owns a succession whose end references it.syside.ActionUsageis a curated narrowing: the grammar admits any feature here, and the metamodel types the property as an action.
- Returns:
The new
syside.TransitionUsage.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_include_use_case(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., use_case_included: syside.UseCaseUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.IncludeUseCaseUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [individual] [<portion>] [#<metadata>] include use case <short_name> <name> ::> <use_case_included> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> { <result> }.The new include use case usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no include use case usage can be written in their bodies. Passing one raisesTypeError.There are two ways to write an include use case usage in the textual syntax: the declaration
include use case ...;, and the reference shorthandinclude <use_case_included>;, which declares no usage of its own.use_case_included=writes the shorthand’s reference; with a name, the declaration writes it as::> <use_case_included>. The specialization clauses combine with either.With
variant=True, the new variant include use case usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant include use case usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
member="return", the new return include use case usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return include use case usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end include use case usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end include use case usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new include use case usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant include use case ...;: the new include use case usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new include use case usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn include use case ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.use_case_included – The use case the usage references: the reference form
include <use_case_included>;, an alternative to declaring a usage of its own. It keeps its own owner.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.IncludeUseCaseUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If both
equalsandresultare given: a value and a result expression together have no stated meaning.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_include_use_case(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., use_case_included: syside.UseCaseUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.IncludeUseCaseUsage
- new_include_use_case(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., use_case_included: syside.UseCaseUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.IncludeUseCaseUsage
- new_include_use_case(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., use_case_included: syside.UseCaseUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.IncludeUseCaseUsage
- new_perform_action(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., performed_action: syside.ActionUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PerformActionUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [individual] [<portion>] [#<metadata>] perform action <short_name> <name> ::> <performed_action> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new perform action usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no perform action usage can be written in their bodies. Passing one raisesTypeError.There are two ways to write a perform action usage in the textual syntax: the declaration
perform action ...;, and the reference shorthandperform <performed_action>;, which declares no usage of its own.performed_action=writes the shorthand’s reference; with a name, the declaration writes it as::> <performed_action>. The specialization clauses combine with either.With
variant=True, the new variant perform action usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant perform action usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
member="return", the new return perform action usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return perform action usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
member="entry", the new entry perform action usage goes inowner, through aStateSubactionMembership.metadatamay not be given for ansyside.ExhibitStateUsage,syside.StateDefinitionorsyside.StateUsageowner: no metadata prefix can be written in their bodies. Passing one raisesTypeError.directionmay not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raisesTypeError.constantmay not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raisesTypeError.individualmay not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raisesTypeError.portionmay not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raisesTypeError.A state has at most one action in each of the
entry,doandexitpositions. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.With
member="do", the new do perform action usage goes inowner, through aStateSubactionMembership.metadatamay not be given for ansyside.ExhibitStateUsage,syside.StateDefinitionorsyside.StateUsageowner: no metadata prefix can be written in their bodies. Passing one raisesTypeError.directionmay not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raisesTypeError.constantmay not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raisesTypeError.individualmay not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raisesTypeError.portionmay not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raisesTypeError.A state has at most one action in each of the
entry,doandexitpositions. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.With
member="exit", the new exit perform action usage goes inowner, through aStateSubactionMembership.metadatamay not be given for ansyside.ExhibitStateUsage,syside.StateDefinitionorsyside.StateUsageowner: no metadata prefix can be written in their bodies. Passing one raisesTypeError.directionmay not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raisesTypeError.constantmay not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raisesTypeError.individualmay not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raisesTypeError.portionmay not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raisesTypeError.A state has at most one action in each of the
entry,doandexitpositions. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.With
prefix="end", the new end perform action usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end perform action usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new perform action usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant perform action ...;: the new perform action usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new perform action usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn perform action ...;member form, under aReturnParameterMembership."entry": theentry action ...;member form, under aStateSubactionMembership."do": thedo action ...;member form, under aStateSubactionMembership."exit": theexit action ...;member form, under aStateSubactionMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.performed_action – The action the usage references: the reference form
perform <performed_action>;, an alternative to declaring a usage of its own. It keeps its own owner.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.PerformActionUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_perform_action(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., performed_action: syside.ActionUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PerformActionUsage
- new_perform_action(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., performed_action: syside.ActionUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PerformActionUsage
- new_perform_action(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., performed_action: syside.ActionUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PerformActionUsage
- new_perform_action(owner: syside.StateDefinition | syside.StateUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[entry, do, exit], prefix: None = ..., metadata: tuple[] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: typing.Literal[False] = ..., constant: typing.Literal[False] = ..., individual: typing.Literal[False] = ..., portion: None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., performed_action: syside.ActionUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PerformActionUsage
- new_requirement(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.RequirementUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] requirement <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new requirement usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no requirement usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant requirement usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant requirement usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return requirement usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return requirement usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end requirement usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end requirement usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new requirement usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant requirement ...;: the new requirement usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new requirement usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn requirement ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.RequirementUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_requirement(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.RequirementUsage
- new_requirement(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.RequirementUsage
- new_requirement(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.RequirementUsage
- new_satisfy_requirement(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., satisfied_requirement: syside.RequirementUsage | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., negated: bool = ..., satisfied_by: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ...) syside.SatisfyRequirementUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] [not] satisfy requirement <short_name> <name> ::> <satisfied_requirement> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> by <satisfied_by>;.The new satisfy requirement usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no satisfy requirement usage can be written in their bodies. Passing one raisesTypeError.There are two ways to write a satisfy requirement usage in the textual syntax: the declaration
satisfy requirement ...;, and the reference shorthandsatisfy <satisfied_requirement>;, which declares no usage of its own.satisfied_requirement=writes the shorthand’s reference; with a name, the declaration writes it as::> <satisfied_requirement>. The specialization clauses combine with either.With
variant=True, the new variant satisfy requirement usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant satisfy requirement usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
member="return", the new return satisfy requirement usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return satisfy requirement usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end satisfy requirement usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end satisfy requirement usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new satisfy requirement usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant satisfy requirement ...;: the new satisfy requirement usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new satisfy requirement usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn satisfy requirement ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.satisfied_requirement – The requirement usage the usage references: the reference form
satisfy <satisfied_requirement> by x;, an alternative to declaring a usage of its own. It keeps its own owner. Achain()must end in a requirement usage (validateSatisfyRequirementUsageReference).multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.negated – The
notkeyword: the usage asserts that the constraint or requirement is false rather than true.satisfied_by – The
byclause: the feature, orchain(), that satisfies the requirement. It keeps its own owner; the usage’s subject parameter references it.Noneomits the clause.
- Returns:
The new
syside.SatisfyRequirementUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).ValueError – If
satisfied_requirementis a chain whose last feature is no RequirementUsage (validateSatisfyRequirementUsageReference).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_satisfy_requirement(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., satisfied_requirement: syside.RequirementUsage | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., negated: bool = ..., satisfied_by: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ...) syside.SatisfyRequirementUsage
- new_satisfy_requirement(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., satisfied_requirement: syside.RequirementUsage | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., negated: bool = ..., satisfied_by: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ...) syside.SatisfyRequirementUsage
- new_satisfy_requirement(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., satisfied_requirement: syside.RequirementUsage | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., negated: bool = ..., satisfied_by: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ...) syside.SatisfyRequirementUsage
- new_state(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., parallel: bool = ...) syside.StateUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] state <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> [parallel { }].The new state usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no state usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant state usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant state usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return state usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return state usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end state usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end state usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new state usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant state ...;: the new state usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new state usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn state ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.parallel – The
parallelkeyword before the body: the states in the body are performed concurrently, where otherwise at most one of them is performed at a time, and no transition is allowed between them (SysML 7.18.2). The keyword is written with a body,state s parallel { }.
- Returns:
The new
syside.StateUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_state(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., parallel: bool = ...) syside.StateUsage
- new_state(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., parallel: bool = ...) syside.StateUsage
- new_state(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., parallel: bool = ...) syside.StateUsage
- new_transition(owner: syside.StateDefinition | syside.StateUsage, name: str | None = ..., short_name: str | None = ..., *, visibility: syside.VisibilityKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., source: syside.StateUsage, payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: Iterable[syside.Classifier] = ..., payload_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., payload_initial: bool = ..., trigger: syside.experimental.expressions.TriggerTemplate | None = ..., receiver: syside.experimental.expressions.ExpressionLike | None = ..., guard: syside.experimental.expressions.ExpressionLike | None = ..., effect: syside.ActionUsage | None = ..., target: syside.ActionUsage) syside.TransitionUsage
Create
[<visibility>] transition <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] first <source> accept <<payload_short_name>> <payload_name> : <payload_defined_by> :> <payload_subsets> ::> <payload_references> :>> <payload_redefines> <payload_multiplicity> [ordered] [default] [:]= <payload_equals> <trigger> via <receiver> if <guard> do <effect> then <target>;.The
firstandthenclauses name features that keep their own owners. What the transition owns is the succession between them, whose second end referencestarget; its first end is derived fromsource.- Parameters:
owner – The element to create the new transition in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.source – The action or state the transition runs from, written after
first. It keeps its own owner: the transition references it.syside.ActionUsageis a curated narrowing: the grammar admits any feature here, and the metamodel types the property as an action.payload_short_name – The
<...>short name of the payload, written before its name:accept <s> x : T;.payload_name – The declared name of the payload parameter, written after
accept.Noneleaves the payload anonymous, theaccept <type> ...;form.payload_defined_by – The payload parameter’s
:/defined byclause: each type becomes oneFeatureTypingon the payload.payload_subsets – The payload’s
:>/subsetsclause: each entry becomes oneSubsettingof the payload. An entry is a feature, or achain()of two or more features standing for their feature chain.payload_references – The payload’s
::>/referencesclause: the feature becomes the oneReferenceSubsettingthe payload may own. A feature, or achain()of two or more features.payload_redefines – The payload’s
:>>/redefinesclause: each entry becomes oneRedefinitionof the payload. An entry is a feature, or achain()of two or more features standing for their feature chain.payload_multiplicity – The payload’s
[...]clause, built bybounds().payload_ordered – The
orderedkeyword on the payload: its values are ordered.payload_equals – The payload’s
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the payload’s value.Noneleaves the payload without a value.payload_default – The
defaultkeyword before the payload’s value:payload_equalsis a default value, where a plain value is fixed.accept x : T default = v;. Needspayload_equals=.payload_initial –
:=in place of=:payload_equalsis an initial value, where=gives a bound one.accept x : T := v;. Needspayload_equals=.trigger – The time or change trigger,
at <time>,after <delay>orwhen <condition>, built byat(),after()orwhen(). It is the payload parameter’s value;Noneaccepts a payload instead.receiver – The trigger’s
viaclause: what the payload is accepted via, as anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).Noneomits the clause.guard – The condition written after
if: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the transition’s guard expression.effect – The action the transition performs on firing, written after
do. It keeps its own owner: the transition owns aPerformActionUsagereferencing it.syside.ActionUsageis a curated narrowing: the grammar admits any feature here, and the metamodel types the property as an action.target – The action or state the transition runs to, written after
then. It keeps its own owner: the transition owns a succession whose end references it.syside.ActionUsageis a curated narrowing: the grammar admits any feature here, and the metamodel types the property as an action.
- Returns:
The new
syside.TransitionUsage.- Raises:
ValueError – If
payload_defaultorpayload_initialis given withoutpayload_equals: each describes the value.ValueError – If a trigger is given and
sourceis no state: a trigger is valid only on a transition from a state (SysML 2.1validateTransitionUsageTriggerActions).TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If an entry of
payload_defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().TypeError – If
payload_multiplicityis not a template built bybounds().TypeError – If
payload_equalsis given withtrigger: the trigger is the payload’s value.TypeError – If
payload_multiplicity,payload_orderedorpayload_equalsis given without a specialization of the payload (payload_defined_by,payload_subsets,payload_referencesorpayload_redefines), orpayload_short_name,payload_nameorreceiverwithout one and withouttrigger: a payload is declared with a specialization (SysML 2.1 8.2.2.16PayloadFeature).
- new_transition(owner: syside.StateDefinition | syside.StateUsage, name: str | None = ..., short_name: str | None = ..., *, visibility: syside.VisibilityKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., source: syside.ActionUsage, payload_short_name: None = ..., payload_name: None = ..., payload_defined_by: tuple[] = ..., payload_subsets: tuple[] = ..., payload_references: None = ..., payload_redefines: tuple[] = ..., payload_multiplicity: None = ..., payload_ordered: Literal[False] = ..., payload_equals: None = ..., payload_default: Literal[False] = ..., payload_initial: Literal[False] = ..., trigger: None = ..., receiver: None = ..., guard: syside.experimental.expressions.ExpressionLike | None = ..., effect: syside.ActionUsage | None = ..., target: syside.ActionUsage) syside.TransitionUsage
- new_use_case(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.UseCaseUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] use case <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> { <result> }.The new use case usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no use case usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant use case usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant use case usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return use case usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return use case usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end use case usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end use case usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new use case usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant use case ...;: the new use case usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new use case usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn use case ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.UseCaseUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If both
equalsandresultare given: a value and a result expression together have no stated meaning.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_use_case(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.UseCaseUsage
- new_use_case(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.UseCaseUsage
- new_use_case(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.UseCaseUsage
- new_verification(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.VerificationCaseUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] verification <short_name> <name> ::> <references> : <defined_by> : ~<conjugates> :> <subsets> => <crosses> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> { <result> }.The new verification case usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no verification case usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant verification case usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant verification case usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return verification case usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return verification case usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.crossesmay not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end verification case usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end verification case usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new verification case usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant verification ...;: the new verification case usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new verification case usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn verification ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.conjugates – The
~form of the:/defined byclause: each conjugated port definition becomes oneConjugatedPortTyping. A port definition’s conjugate is itsconjugated_port_definition.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.crosses – The
=>/crossesrider: thechain()of exactly two features this end crosses, written=> e1.x. It becomes the oneCrossSubsettinga feature may own.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.VerificationCaseUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If both
equalsandresultare given: a value and a result expression together have no stated meaning.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_verification(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., conjugates: Iterable[syside.ConjugatedPortDefinition] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.VerificationCaseUsage
- new_verification(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: syside.experimental.expressions.FeatureChainTemplate | None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.VerificationCaseUsage
- new_verification(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., conjugates: typing.Iterable[syside.ConjugatedPortDefinition] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., crosses: None = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.VerificationCaseUsage
- new_viewpoint(owner: syside.Definition | syside.Package | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[abstract, variation] | None=..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None=..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: Literal[False] = ..., cross_nonunique: Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ViewpointUsage
Create
[<visibility>] [variant] [<member>] [<direction>] [derived] [<prefix>] [<<cross_short_name>>] [<cross_name>] [<cross_multiplicity>] [ordered] [nonunique] [:> <cross_subsets>] [constant] [ref] [individual] [<portion>] [#<metadata>] viewpoint <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The new viewpoint usage goes in
owner. The membership kind is derived fromowner’s kind:ownermembership kind
FeatureMembershipOwningMembershipFeatureMembershipownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no viewpoint usage can be written in their bodies. Passing one raisesTypeError.With
variant=True, the new variant viewpoint usage goes inowner, through aVariantMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no variant viewpoint usage can be written in their bodies. Passing one raisesTypeError.A variant member is admissible only in a variation definition or usage. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
variant=True,references=and no name, this is the variant referencevariant <references>;(SysML 8.2.2.6.3).With
member="return", the new return viewpoint usage goes inowner, through aReturnParameterMembership.ownermay not be asyside.ConcernDefinition,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.ViewpointDefinitionorsyside.ViewpointUsage: no return viewpoint usage can be written in their bodies. Passing one raisesTypeError.With member=”return”,
directionadmits onlyOut: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raisesTypeError.A function owns at most one return parameter. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.
With
prefix="end", the new end viewpoint usage goes inowner, through aFeatureMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsage,syside.MetadataUsageorsyside.WhileLoopActionUsage: no end viewpoint usage can be written in their bodies. Passing one raisesTypeError.directionmay not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raisesTypeError.derivedmay not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.constantmay not be given with prefix=”end”: the grammar writes no constant after end. Passing one raisesTypeError.individualmay not be given with prefix=”end”: the grammar writes no individual after end. Passing one raisesTypeError.refmay not be given with prefix=”end”: the grammar writes no ref after end. Passing one raisesTypeError.portionmay not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raisesTypeError.An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the
endfeatures are what relates them. Outside an association an end feature still has multiplicity1..1and no direction.- Parameters:
owner – The element to create the new viewpoint usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.variant –
Truefor thevariantmember form,variant viewpoint ...;: the new viewpoint usage then goes in aVariantMembership, andownermust be one of the kinds admitting it (see above).member – The dedicated member position, if any – a membership kind of its own for the same new viewpoint usage;
ownermust be one of the kinds admitting it (see above)."return": thereturn viewpoint ...;member form, under aReturnParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to."end": the usage is an end feature ofowner; in a connection definition or usage, one of the related elements a concrete association needs at least two of.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.cross_name – The declared name of the end’s owned cross feature, written after
end: from one value of the other end, the collection of this end’s values across the connections. Anycross_*argument creates the cross feature; it is valid only withprefix="end".cross_short_name – The
<...>short name of the end’s owned cross feature.cross_multiplicity – The cross multiplicity, the
[...]afterend, built bybounds(): from one value of the other end, how many values of this end there are across the connections.end [1..*] part discross_multiplicity=bounds(1, INFINITY); the end’s ownmultiplicity=is always1..1.cross_ordered –
orderedon the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.cross_nonunique –
nonuniqueon the end’s owned cross feature: one value of this end may occur several times across the connections from one value of the other end.cross_subsets – The
:>clause of the end’s owned cross feature: each entry becomes oneSubsettingof the cross feature. An entry is a feature, or achain()of two or more features standing for their feature chain.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*]. Withprefix="end"it admits only1..1, an end feature’s own multiplicity (KerMLvalidateFeatureEndMultiplicity);end [1..*] part dwritescross_multiplicity=.ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.ViewpointUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
prefixis"end"andmultiplicityis a bound other than1..1without a feature reference.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
cross_multiplicityis not a template built bybounds().TypeError – If
multiplicityis not a template built bybounds().
- new_viewpoint(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: Literal[False] = ..., member: None = ..., prefix: Literal[end], metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: Literal[False] = ..., constant: Literal[False] = ..., individual: Literal[False] = ..., ref: Literal[False] = ..., portion: None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: str | None = ..., cross_short_name: str | None = ..., cross_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., cross_ordered: bool = ..., cross_nonunique: bool = ..., cross_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ViewpointUsage
- new_viewpoint(owner: syside.Definition | syside.Usage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[True], member: None = ..., prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ViewpointUsage
- new_viewpoint(owner: syside.CalculationDefinition | syside.CalculationUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, variant: typing.Literal[False] = ..., member: typing.Literal[return], prefix: typing.Literal[abstract, variation, end] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.Out] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., cross_name: None = ..., cross_short_name: None = ..., cross_multiplicity: None = ..., cross_ordered: typing.Literal[False] = ..., cross_nonunique: typing.Literal[False] = ..., cross_subsets: tuple[] = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ViewpointUsage
- new_accept(owner: syside.ActionDefinition | syside.ActionUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, member: None = ..., prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: Iterable[syside.Classifier] = ..., payload_subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., payload_initial: bool = ..., trigger: syside.experimental.expressions.TriggerTemplate | None = ..., receiver: syside.experimental.expressions.ExpressionLike | None = ...) syside.AcceptActionUsage
Create
[<visibility>] [<member>] [<direction>] [derived] [<prefix>] [constant] [ref] [individual] [<portion>] [#<metadata>] [action <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique]] accept <<payload_short_name>> <payload_name> : <payload_defined_by> :> <payload_subsets> ::> <payload_references> :>> <payload_redefines> <payload_multiplicity> [ordered] [default] [:]= <payload_equals> <trigger> via <receiver>;.The new accept action usage goes in
owner, through aFeatureMembership.ownermay not be asyside.ConcernDefinition,syside.ConcernUsage,syside.ExhibitStateUsage,syside.FlowDefinition,syside.FlowUsage,syside.ForLoopActionUsage,syside.IfActionUsage,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.StateDefinition,syside.StateUsage,syside.SuccessionFlowUsage,syside.ViewpointDefinition,syside.ViewpointUsageorsyside.WhileLoopActionUsage: no accept action usage can be written in their bodies. Passing one raisesTypeError.With
member="entry", the new entry accept action usage goes inowner, through aStateSubactionMembership.metadatamay not be given for ansyside.ExhibitStateUsage,syside.StateDefinitionorsyside.StateUsageowner: no metadata prefix can be written in their bodies. Passing one raisesTypeError.directionmay not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raisesTypeError.constantmay not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raisesTypeError.individualmay not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raisesTypeError.refmay not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raisesTypeError.portionmay not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raisesTypeError.A state has at most one action in each of the
entry,doandexitpositions. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.With
member="do", the new do accept action usage goes inowner, through aStateSubactionMembership.metadatamay not be given for ansyside.ExhibitStateUsage,syside.StateDefinitionorsyside.StateUsageowner: no metadata prefix can be written in their bodies. Passing one raisesTypeError.directionmay not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raisesTypeError.constantmay not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raisesTypeError.individualmay not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raisesTypeError.refmay not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raisesTypeError.portionmay not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raisesTypeError.A state has at most one action in each of the
entry,doandexitpositions. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.With
member="exit", the new exit accept action usage goes inowner, through aStateSubactionMembership.metadatamay not be given for ansyside.ExhibitStateUsage,syside.StateDefinitionorsyside.StateUsageowner: no metadata prefix can be written in their bodies. Passing one raisesTypeError.directionmay not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raisesTypeError.constantmay not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raisesTypeError.individualmay not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raisesTypeError.refmay not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raisesTypeError.portionmay not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raisesTypeError.A state has at most one action in each of the
entry,doandexitpositions. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.- Parameters:
owner – The element to create the new accept action usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.member – The dedicated member position, if any – a membership kind of its own for the same new accept action usage;
ownermust be one of the kinds admitting it (see above)."entry": theentry accept ...;member form, under aStateSubactionMembership."do": thedo accept ...;member form, under aStateSubactionMembership."exit": theexit accept ...;member form, under aStateSubactionMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.payload_short_name – The
<...>short name of the payload, written before its name:accept <s> x : T;.payload_name – The declared name of the payload parameter, written after
accept.Noneleaves the payload anonymous, theaccept <type> ...;form.payload_defined_by – The payload parameter’s
:/defined byclause: each type becomes oneFeatureTypingon the payload.payload_subsets – The payload’s
:>/subsetsclause: each entry becomes oneSubsettingof the payload. An entry is a feature, or achain()of two or more features standing for their feature chain.payload_references – The payload’s
::>/referencesclause: the feature becomes the oneReferenceSubsettingthe payload may own. A feature, or achain()of two or more features.payload_redefines – The payload’s
:>>/redefinesclause: each entry becomes oneRedefinitionof the payload. An entry is a feature, or achain()of two or more features standing for their feature chain.payload_multiplicity – The payload’s
[...]clause, built bybounds().payload_ordered – The
orderedkeyword on the payload: its values are ordered.payload_equals – The payload’s
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the payload’s value.Noneleaves the payload without a value.payload_default – The
defaultkeyword before the payload’s value:payload_equalsis a default value, where a plain value is fixed.accept x : T default = v;. Needspayload_equals=.payload_initial –
:=in place of=:payload_equalsis an initial value, where=gives a bound one.accept x : T := v;. Needspayload_equals=.trigger – The time or change trigger,
at <time>,after <delay>orwhen <condition>, built byat(),after()orwhen(). It is the payload parameter’s value;Noneaccepts a payload instead.receiver – The
viaclause: what the payload is accepted via, as anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).Noneomits the clause.
- Returns:
The new
syside.AcceptActionUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.ValueError – If
payload_defaultorpayload_initialis given withoutpayload_equals: each describes the value.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If an entry of
payload_defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().TypeError – If
payload_multiplicityis not a template built bybounds().TypeError – If none of
payload_defined_by,payload_subsets,payload_references,payload_redefinesortriggeris given:acceptwrites a payload with a specialization, or a trigger.TypeError – If
payload_equalsis given withtrigger: the trigger is the payload’s value.TypeError – If
payload_multiplicity,payload_orderedorpayload_equalsis given without a specialization of the payload (payload_defined_by,payload_subsets,payload_referencesorpayload_redefines), orpayload_short_name,payload_nameorreceiverwithout one and withouttrigger: a payload is declared with a specialization (SysML 2.1 8.2.2.16PayloadFeature).
- new_accept(owner: syside.StateDefinition | syside.StateUsage, name: str | None = ..., short_name: str | None = ..., *, member: typing.Literal[entry, do, exit], prefix: None = ..., metadata: tuple[] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: typing.Literal[False] = ..., constant: typing.Literal[False] = ..., individual: typing.Literal[False] = ..., ref: typing.Literal[False] = ..., portion: None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., payload_short_name: str | None = ..., payload_name: str | None = ..., payload_defined_by: typing.Iterable[syside.Classifier] = ..., payload_subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., payload_redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., payload_multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., payload_ordered: bool = ..., payload_equals: syside.experimental.expressions.ExpressionLike | None = ..., payload_default: bool = ..., payload_initial: bool = ..., trigger: syside.experimental.expressions.TriggerTemplate | None = ..., receiver: syside.experimental.expressions.ExpressionLike | None = ...) syside.AcceptActionUsage
- new_assign(owner: syside.ActionDefinition | syside.ActionUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, member: None = ..., prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., target_object: syside.experimental.expressions.ExpressionLike | None = ..., assigned_target: syside.Feature | syside.experimental.expressions.FeatureChainTemplate, assigned_value: syside.experimental.expressions.ExpressionLike) syside.AssignmentActionUsage
Create
[<visibility>] [<member>] [<direction>] [derived] [<prefix>] [constant] [ref] [individual] [<portion>] [#<metadata>] [action <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique]] assign [(<target_object>).]<assigned_target> := <assigned_value>;.The new assignment action usage goes in
owner, through aFeatureMembership.ownermay not be asyside.ConcernDefinition,syside.ConcernUsage,syside.ExhibitStateUsage,syside.FlowDefinition,syside.FlowUsage,syside.ForLoopActionUsage,syside.IfActionUsage,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.StateDefinition,syside.StateUsage,syside.SuccessionFlowUsage,syside.ViewpointDefinition,syside.ViewpointUsageorsyside.WhileLoopActionUsage: no assignment action usage can be written in their bodies. Passing one raisesTypeError.With
member="entry", the new entry assignment action usage goes inowner, through aStateSubactionMembership.metadatamay not be given for ansyside.ExhibitStateUsage,syside.StateDefinitionorsyside.StateUsageowner: no metadata prefix can be written in their bodies. Passing one raisesTypeError.directionmay not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raisesTypeError.constantmay not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raisesTypeError.individualmay not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raisesTypeError.refmay not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raisesTypeError.portionmay not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raisesTypeError.A state has at most one action in each of the
entry,doandexitpositions. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.With
member="do", the new do assignment action usage goes inowner, through aStateSubactionMembership.metadatamay not be given for ansyside.ExhibitStateUsage,syside.StateDefinitionorsyside.StateUsageowner: no metadata prefix can be written in their bodies. Passing one raisesTypeError.directionmay not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raisesTypeError.constantmay not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raisesTypeError.individualmay not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raisesTypeError.refmay not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raisesTypeError.portionmay not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raisesTypeError.A state has at most one action in each of the
entry,doandexitpositions. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.With
member="exit", the new exit assignment action usage goes inowner, through aStateSubactionMembership.metadatamay not be given for ansyside.ExhibitStateUsage,syside.StateDefinitionorsyside.StateUsageowner: no metadata prefix can be written in their bodies. Passing one raisesTypeError.directionmay not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raisesTypeError.constantmay not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raisesTypeError.individualmay not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raisesTypeError.refmay not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raisesTypeError.portionmay not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raisesTypeError.A state has at most one action in each of the
entry,doandexitpositions. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.- Parameters:
owner – The element to create the new assignment action usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.member – The dedicated member position, if any – a membership kind of its own for the same new assignment action usage;
ownermust be one of the kinds admitting it (see above)."entry": theentry assign ...;member form, under aStateSubactionMembership."do": thedo assign ...;member form, under aStateSubactionMembership."exit": theexit assign ...;member form, under aStateSubactionMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.target_object – The expression whose result the action assigns into:
assign (<target_object>).x := ....None(the default) for a feature reference, written as the first feature ofassigned_target=’schain(), or for no target at all (the occurrence owning the action).assigned_target – What follows
assign: a feature, which the action assigns to, or achain(), split as the textassign c.v.speedis – its first feature the target object, the rest the feature assigned to (SysML 2.1 7.17.9). Withtarget_object=, the whole value is the feature assigned to. The features keep their own owners: the assignment references them. Validation reports a feature assigned to that cannot vary (validateAssignmentActionUsageReferentIsTimeVarying).assigned_value – The value the action assigns, written after
:=: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the action’s value argument.
- Returns:
The new
syside.AssignmentActionUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).ValueError – If
target_objectis a feature reference, which is the first feature of aassigned_targetchain.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_assign(owner: syside.StateDefinition | syside.StateUsage, name: str | None = ..., short_name: str | None = ..., *, member: typing.Literal[entry, do, exit], prefix: None = ..., metadata: tuple[] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: typing.Literal[False] = ..., constant: typing.Literal[False] = ..., individual: typing.Literal[False] = ..., ref: typing.Literal[False] = ..., portion: None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., target_object: syside.experimental.expressions.ExpressionLike | None = ..., assigned_target: syside.Feature | syside.experimental.expressions.FeatureChainTemplate, assigned_value: syside.experimental.expressions.ExpressionLike) syside.AssignmentActionUsage
- new_decide(owner: syside.ActionDefinition | syside.ActionUsage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ...) syside.DecisionNode
Create
[<visibility>] [<direction>] [derived] [<prefix>] [constant] [individual] [<portion>] [#<metadata>] decide <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique];.The new decision node goes in
owner, through aFeatureMembership.ownermay not be ansyside.ExhibitStateUsage,syside.FlowDefinition,syside.FlowUsage,syside.ForLoopActionUsage,syside.IfActionUsage,syside.StateDefinition,syside.StateUsage,syside.SuccessionFlowUsageorsyside.WhileLoopActionUsage: no decision node can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new decision node in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.
- Returns:
The new
syside.DecisionNode.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_for(owner: syside.ActionDefinition | syside.ActionUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., variable_name: str | None = ..., sequence: syside.experimental.expressions.ExpressionLike) syside.ForLoopActionUsage
Create
[<visibility>] [<direction>] [derived] [<prefix>] [constant] [ref] [individual] [<portion>] [#<metadata>] [action <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique]] for <variable_name> in <sequence> { ... }.The new for loop action usage goes in
owner, through aFeatureMembership.ownermay not be asyside.ConcernDefinition,syside.ConcernUsage,syside.ExhibitStateUsage,syside.FlowDefinition,syside.FlowUsage,syside.ForLoopActionUsage,syside.IfActionUsage,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.StateDefinition,syside.StateUsage,syside.SuccessionFlowUsage,syside.ViewpointDefinition,syside.ViewpointUsageorsyside.WhileLoopActionUsage: no for loop action usage can be written in their bodies. Passing one raisesTypeError.The
{ ... }body is created empty: reach it throughget_loop_body()and populate it owner-first with the ordinary constructors, as any action body:loop = new_for(action_def, variable_name="i", sequence=ref(xs)) a = new_action(get_loop_body(loop), "a")
- Parameters:
owner – The element to create the new for loop action usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.variable_name – The declared name of the loop variable, written after
for.Noneleaves the variable anonymous. The variable itself is reached throughget_loop_variable().sequence – What the loop iterates over, written after
in: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the loop’s sequence argument.
- Returns:
The new
syside.ForLoopActionUsage.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_fork(owner: syside.ActionDefinition | syside.ActionUsage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ...) syside.ForkNode
Create
[<visibility>] [<direction>] [derived] [<prefix>] [constant] [individual] [<portion>] [#<metadata>] fork <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique];.The new fork node goes in
owner, through aFeatureMembership.ownermay not be ansyside.ExhibitStateUsage,syside.FlowDefinition,syside.FlowUsage,syside.ForLoopActionUsage,syside.IfActionUsage,syside.StateDefinition,syside.StateUsage,syside.SuccessionFlowUsageorsyside.WhileLoopActionUsage: no fork node can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new fork node in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.
- Returns:
The new
syside.ForkNode.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_if(owner: syside.ActionDefinition | syside.ActionUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, member: None = ..., prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., condition: syside.experimental.expressions.ExpressionLike, else_body: bool = ..., else_if: syside.experimental.expressions.ExpressionLike | None = ...) syside.IfActionUsage
Create
[<visibility>] [<member>] [<direction>] [derived] [<prefix>] [constant] [ref] [individual] [<portion>] [#<metadata>] [action <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique]] if <condition> { ... } [else { ... }] [else if <else_if> { ... }].The new if action usage goes in
owner, through aFeatureMembership.ownermay not be asyside.ConcernDefinition,syside.ConcernUsage,syside.ExhibitStateUsage,syside.FlowDefinition,syside.FlowUsage,syside.ForLoopActionUsage,syside.IfActionUsage,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.StateDefinition,syside.StateUsage,syside.SuccessionFlowUsage,syside.ViewpointDefinition,syside.ViewpointUsageorsyside.WhileLoopActionUsage: no if action usage can be written in their bodies. Passing one raisesTypeError.The
{ ... }body is created empty: reach it throughget_then_body()and populate it owner-first with the ordinary constructors, as any action body:if_action = new_if(action_def, condition=ref(x)) a = new_action(get_then_body(if_action), "a")
else_body=Trueadds an emptyelse { ... }body, reached throughget_else_body()and populated the same way.else_if=nests a furtherifin that branch instead, reached throughget_else_body(); its bodies are reached as above.With
member="else", the new else if goes inowner, through aParameterMembership.visibilitymay not be given for ansyside.IfActionUsageowner: no visibility indicator can be written in its body. Passing one raisesTypeError.With member=”else”,
directionadmits onlyIn: an else action is a parameter membership’s member parameter, whose direction is in (KerML validateParameterMembershipParameterDirection). Passing another value raisesTypeError.An if action has one
elseslot, somember="else"replaces whatever the slot held – an else body, or an earlier else-if – aselse_if=at construction does.The call is refused with
ValueError, and nothing is changed, while an argument or the model refers to the element being replaced or to an element it owns: the reference would be left without a target.- Parameters:
owner – The element to create the new if action usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.member – The dedicated member position, if any – a membership kind of its own for the same new if action usage;
ownermust be one of the kinds admitting it (see above)."else": the else if ofowner, replacing what the slot holds, under aParameterMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.condition – The condition written after
if: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the node’s condition argument.else_body –
Trueadds an emptyelse { ... }body, reached throughget_else_body()and populated as thethenbody is. An alternative toelse_if: an if action has oneelsebranch.else_if – The condition of a nested
else if: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)). The nested if action is reached throughget_else_body()(narrowed toIfActionUsage), and its bodies as this one’s. An alternative toelse_body;Nonewrites noelse if.
- Returns:
The new
syside.IfActionUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If both
else_bodyandelse_ifare given: they are alternatives for the oneelse { ... }branch.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_if(owner: syside.IfActionUsage, name: str | None = ..., short_name: str | None = ..., *, member: typing.Literal[else], prefix: typing.Literal[abstract] | None = ..., metadata: typing.Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: typing.Literal[syside.FeatureDirectionKind.In] | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: typing.Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., condition: syside.experimental.expressions.ExpressionLike, else_body: bool = ..., else_if: syside.experimental.expressions.ExpressionLike | None = ...) syside.IfActionUsage
- new_join(owner: syside.ActionDefinition | syside.ActionUsage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ...) syside.JoinNode
Create
[<visibility>] [<direction>] [derived] [<prefix>] [constant] [individual] [<portion>] [#<metadata>] join <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique];.The new join node goes in
owner, through aFeatureMembership.ownermay not be ansyside.ExhibitStateUsage,syside.FlowDefinition,syside.FlowUsage,syside.ForLoopActionUsage,syside.IfActionUsage,syside.StateDefinition,syside.StateUsage,syside.SuccessionFlowUsageorsyside.WhileLoopActionUsage: no join node can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new join node in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.
- Returns:
The new
syside.JoinNode.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_merge(owner: syside.ActionDefinition | syside.ActionUsage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ...) syside.MergeNode
Create
[<visibility>] [<direction>] [derived] [<prefix>] [constant] [individual] [<portion>] [#<metadata>] merge <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique];.The new merge node goes in
owner, through aFeatureMembership.ownermay not be ansyside.ExhibitStateUsage,syside.FlowDefinition,syside.FlowUsage,syside.ForLoopActionUsage,syside.IfActionUsage,syside.StateDefinition,syside.StateUsage,syside.SuccessionFlowUsageorsyside.WhileLoopActionUsage: no merge node can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new merge node in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.
- Returns:
The new
syside.MergeNode.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_send(owner: syside.ActionDefinition | syside.ActionUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, member: None = ..., prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., payload: syside.experimental.expressions.ExpressionLike, sender: syside.experimental.expressions.ExpressionLike | None = ..., receiver: syside.experimental.expressions.ExpressionLike | None = ...) syside.SendActionUsage
Create
[<visibility>] [<member>] [<direction>] [derived] [<prefix>] [constant] [ref] [individual] [<portion>] [#<metadata>] [action <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique]] send <payload> via <sender> to <receiver>;.The new send action usage goes in
owner, through aFeatureMembership.ownermay not be asyside.ConcernDefinition,syside.ConcernUsage,syside.ExhibitStateUsage,syside.FlowDefinition,syside.FlowUsage,syside.ForLoopActionUsage,syside.IfActionUsage,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.StateDefinition,syside.StateUsage,syside.SuccessionFlowUsage,syside.ViewpointDefinition,syside.ViewpointUsageorsyside.WhileLoopActionUsage: no send action usage can be written in their bodies. Passing one raisesTypeError.With
member="entry", the new entry send action usage goes inowner, through aStateSubactionMembership.metadatamay not be given for ansyside.ExhibitStateUsage,syside.StateDefinitionorsyside.StateUsageowner: no metadata prefix can be written in their bodies. Passing one raisesTypeError.directionmay not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raisesTypeError.constantmay not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raisesTypeError.individualmay not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raisesTypeError.refmay not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raisesTypeError.portionmay not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raisesTypeError.A state has at most one action in each of the
entry,doandexitpositions. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.With
member="do", the new do send action usage goes inowner, through aStateSubactionMembership.metadatamay not be given for ansyside.ExhibitStateUsage,syside.StateDefinitionorsyside.StateUsageowner: no metadata prefix can be written in their bodies. Passing one raisesTypeError.directionmay not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raisesTypeError.constantmay not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raisesTypeError.individualmay not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raisesTypeError.refmay not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raisesTypeError.portionmay not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raisesTypeError.A state has at most one action in each of the
entry,doandexitpositions. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.With
member="exit", the new exit send action usage goes inowner, through aStateSubactionMembership.metadatamay not be given for ansyside.ExhibitStateUsage,syside.StateDefinitionorsyside.StateUsageowner: no metadata prefix can be written in their bodies. Passing one raisesTypeError.directionmay not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raisesTypeError.derivedmay not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raisesTypeError.constantmay not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raisesTypeError.individualmay not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raisesTypeError.refmay not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raisesTypeError.portionmay not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raisesTypeError.A state has at most one action in each of the
entry,doandexitpositions. That is a property of the owner’s state rather than of its kind, so it is not checked here: it is reported by validation.- Parameters:
owner – The element to create the new send action usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.member – The dedicated member position, if any – a membership kind of its own for the same new send action usage;
ownermust be one of the kinds admitting it (see above)."entry": theentry send ...;member form, under aStateSubactionMembership."do": thedo send ...;member form, under aStateSubactionMembership."exit": theexit send ...;member form, under aStateSubactionMembership.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.payload – What the action sends, written after
send: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the action’s payload argument.sender – The
viaclause: what the payload is sent via, as anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).Noneomits the clause; the grammar requiresvia,to, or both.receiver – The
toclause: what the payload is sent to, as anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).Noneomits the clause; the grammar requiresvia,to, or both.
- Returns:
The new
syside.SendActionUsage.- Raises:
TypeError – If
owner’s kind is not admissible, or a parameter above may not be given for it; the message says which.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_send(owner: syside.StateDefinition | syside.StateUsage, name: str | None = ..., short_name: str | None = ..., *, member: typing.Literal[entry, do, exit], prefix: None = ..., metadata: tuple[] = ..., visibility: syside.VisibilityKind | None = ..., direction: None = ..., derived: typing.Literal[False] = ..., constant: typing.Literal[False] = ..., individual: typing.Literal[False] = ..., ref: typing.Literal[False] = ..., portion: None = ..., defined_by: typing.Iterable[syside.Classifier] = ..., subsets: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: typing.Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., payload: syside.experimental.expressions.ExpressionLike, sender: syside.experimental.expressions.ExpressionLike | None = ..., receiver: syside.experimental.expressions.ExpressionLike | None = ...) syside.SendActionUsage
- new_terminate(owner: syside.ActionDefinition | syside.ActionUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., terminated_occurrence: syside.experimental.expressions.ExpressionLike | None = ...) syside.TerminateActionUsage
Create
[<visibility>] [<direction>] [derived] [<prefix>] [constant] [ref] [individual] [<portion>] [#<metadata>] [action <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique]] terminate <terminated_occurrence>;.The new terminate action usage goes in
owner, through aFeatureMembership.ownermay not be asyside.ConcernDefinition,syside.ConcernUsage,syside.ExhibitStateUsage,syside.FlowDefinition,syside.FlowUsage,syside.ForLoopActionUsage,syside.IfActionUsage,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.StateDefinition,syside.StateUsage,syside.SuccessionFlowUsage,syside.ViewpointDefinition,syside.ViewpointUsageorsyside.WhileLoopActionUsage: no terminate action usage can be written in their bodies. Passing one raisesTypeError.- Parameters:
owner – The element to create the new terminate action usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.terminated_occurrence – The occurrence the node terminates: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the node’s terminated-occurrence argument.Noneterminates the performing occurrence itself, the bareterminate;form.
- Returns:
The new
syside.TerminateActionUsage.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_while(owner: syside.ActionDefinition | syside.ActionUsage | syside.ConstraintDefinition | syside.ConstraintUsage, name: str | None = ..., short_name: str | None = ..., *, prefix: Literal[abstract, variation] | None = ..., metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., direction: syside.FeatureDirectionKind | None = ..., derived: bool = ..., constant: bool = ..., individual: bool = ..., ref: bool = ..., portion: Literal[snapshot, timeslice] | syside.PortionKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., condition: syside.experimental.expressions.ExpressionLike | None = ..., until: syside.experimental.expressions.ExpressionLike | None = ...) syside.WhileLoopActionUsage
Create
[<visibility>] [<direction>] [derived] [<prefix>] [constant] [ref] [individual] [<portion>] [#<metadata>] [action <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique]] while <condition> { ... } until <until>;.The new while loop action usage goes in
owner, through aFeatureMembership.ownermay not be asyside.ConcernDefinition,syside.ConcernUsage,syside.ExhibitStateUsage,syside.FlowDefinition,syside.FlowUsage,syside.ForLoopActionUsage,syside.IfActionUsage,syside.RequirementDefinition,syside.RequirementUsage,syside.SatisfyRequirementUsage,syside.StateDefinition,syside.StateUsage,syside.SuccessionFlowUsage,syside.ViewpointDefinition,syside.ViewpointUsageorsyside.WhileLoopActionUsage: no while loop action usage can be written in their bodies. Passing one raisesTypeError.The
{ ... }body is created empty: reach it throughget_loop_body()and populate it owner-first with the ordinary constructors, as any action body:loop = new_while(action_def, condition=ref(x)) a = new_action(get_loop_body(loop), "a")
- Parameters:
owner – The element to create the new while loop action usage in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.prefix – The exclusive prefix keyword, if any.
"abstract": the declaration is incomplete on its own and needs a specialization to be usable."variation": the declaration is a variation point, whose body holds thevariantmembers it can be bound to.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.direction – The direction keyword before the usage:
In,OutorInout.None, the default, writes none.derived – The
derivedprefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).constant – The
constantprefix: the usage’s values stay the same over the life of the occurrence featuring it (SysML 7.6.3). Valid only where the usage may vary over time, which validation checks.individual – The
individualprefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).ref – The
refprefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3).Falsewrites no keyword; the usage is still a reference where the spec makes it one (a directed usage, an end, a usage owned by an attribute).portion – The portion prefix, one keyword choice (SysML 8.2.2.9.2):
"snapshot", the usage is one instant of the occurrence its owner is, a time slice with zero duration (SysML 8.3.9.5), or"timeslice", an interval of it. Asyside.PortionKindmember is taken as the keyword of its name.None, the default, writes none.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.condition – The condition written after
while: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the loop’s condition argument.Nonewrites theloop { ... }form, which has no condition.until – The
untilclause after the body: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the loop’s until argument.Noneomits the clause.
- Returns:
The new
syside.WhileLoopActionUsage.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
constantis given withportion: a portion never varies over time (KerML 7.3.4).TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If
directionis not asyside.FeatureDirectionKind.ValueError – If
portionis neitherNone,"snapshot","timeslice"nor asyside.PortionKindmember.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_actor(owner: syside.CaseDefinition | syside.CaseUsage | syside.RequirementDefinition | syside.RequirementUsage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PartUsage
Create
[<visibility>] actor [#<metadata>] <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.Until
ownerhas a subject of its own, this parameter comes before the inherited subject, which validation reports: the subject must be the first input (validateRequirementUsageSubjectParameterPositionand its requirement definition and case counterparts). A subject added later, bynew_subject()orsyside.experimental.query.set_satisfied_by(), is placed before this parameter.- Parameters:
owner – The element to create the new actor in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.PartUsage.- Raises:
ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_assume(owner: syside.RequirementDefinition | syside.RequirementUsage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., assumed_constraint: syside.ConstraintUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.ConstraintUsage
Create
[<visibility>] assume [#<metadata>] constraint <short_name> <name> ::> <assumed_constraint> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> { <result> }.There are two ways to write an assumed constraint in the textual syntax: the declaration
assume constraint ...;, and the reference shorthandassume <assumed_constraint>;, which declares no usage of its own.assumed_constraint=writes the shorthand’s reference; with a name, the declaration writes it as::> <assumed_constraint>. The specialization clauses combine with either.- Parameters:
owner – The element to create the new assumed constraint in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.assumed_constraint – The constraint usage the member references: the reference form
assume <assumed_constraint>;, an alternative to declaring a usage of its own. It keeps its own owner.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.ConstraintUsage.- Raises:
TypeError – If both
equalsandresultare given: a value and a result expression together have no stated meaning.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_frame(owner: syside.RequirementDefinition | syside.RequirementUsage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., framed_concern: syside.ConcernUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ConcernUsage
Create
[<visibility>] frame [#<metadata>] concern <short_name> <name> ::> <framed_concern> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.There are two ways to write a framed concern in the textual syntax: the declaration
frame concern ...;, and the reference shorthandframe <framed_concern>;, which declares no usage of its own.framed_concern=writes the shorthand’s reference; with a name, the declaration writes it as::> <framed_concern>. The specialization clauses combine with either.- Parameters:
owner – The element to create the new framed concern in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.framed_concern – The concern usage the member references: the reference form
frame <framed_concern>;, an alternative to declaring a usage of its own. It keeps its own owner.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.ConcernUsage.- Raises:
ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_objective(owner: syside.CaseDefinition | syside.CaseUsage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.RequirementUsage
Create
[<visibility>] objective [#<metadata>] <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.- Parameters:
owner – The element to create the new objective in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.RequirementUsage.- Raises:
ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_render(owner: syside.ViewDefinition | syside.ViewUsage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., rendering: syside.RenderingUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.RenderingUsage
Create
[<visibility>] render [#<metadata>] rendering <short_name> <name> ::> <rendering> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.There are two ways to write a view rendering in the textual syntax: the declaration
render rendering ...;, and the reference shorthandrender <rendering>;, which declares no usage of its own.rendering=writes the shorthand’s reference; with a name, the declaration writes it as::> <rendering>. The specialization clauses combine with either.- Parameters:
owner – The element to create the new view rendering in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.rendering – The rendering usage the member references: the reference form
render <rendering>;, an alternative to declaring a usage of its own. It keeps its own owner.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.RenderingUsage.- Raises:
ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_require(owner: syside.RequirementDefinition | syside.RequirementUsage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., required_constraint: syside.ConstraintUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ..., result: syside.experimental.expressions.ExpressionLike | None = ...) syside.ConstraintUsage
Create
[<visibility>] require [#<metadata>] constraint <short_name> <name> ::> <required_constraint> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> { <result> }.There are two ways to write a required constraint in the textual syntax: the declaration
require constraint ...;, and the reference shorthandrequire <required_constraint>;, which declares no usage of its own.required_constraint=writes the shorthand’s reference; with a name, the declaration writes it as::> <required_constraint>. The specialization clauses combine with either.- Parameters:
owner – The element to create the new required constraint in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.required_constraint – The constraint usage the member references: the reference form
require <required_constraint>;, an alternative to declaring a usage of its own. It keeps its own owner.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.result – The bare expression the body ends with, bound to the result parameter: an
ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)).
- Returns:
The new
syside.ConstraintUsage.- Raises:
TypeError – If both
equalsandresultare given: a value and a result expression together have no stated meaning.ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_stakeholder(owner: syside.RequirementDefinition | syside.RequirementUsage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.PartUsage
Create
[<visibility>] stakeholder [#<metadata>] <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.Until
ownerhas a subject of its own, this parameter comes before the inherited subject, which validation reports: the subject must be the first input (validateRequirementUsageSubjectParameterPositionand its requirement definition and case counterparts). A subject added later, bynew_subject()orsyside.experimental.query.set_satisfied_by(), is placed before this parameter.- Parameters:
owner – The element to create the new stakeholder in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.PartUsage.- Raises:
ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_subject(owner: syside.CaseDefinition | syside.CaseUsage | syside.RequirementDefinition | syside.RequirementUsage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., references: syside.Feature | syside.experimental.expressions.FeatureChainTemplate | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.ReferenceUsage
Create
[<visibility>] subject [#<metadata>] <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.The subject goes before
owner’s other parameters, whichever was built first: it must be the first input (validateRequirementUsageSubjectParameterPositionand its requirement definition and case counterparts).- Parameters:
owner – The element to create the new subject in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.references – The
::>/referencesclause: the feature becomes the oneReferenceSubsettinga feature may own. A feature, or achain()of two or more features.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.ReferenceUsage.- Raises:
ValueError – If
defaultorinitialis given withoutequals: each describes the value.ValueError – If
owneris a satisfy requirement usage with abyclause, which is its subject already: a requirement usage has at most one (validateRequirementUsageOnlyOneSubject).TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_verify(owner: syside.RequirementDefinition | syside.RequirementUsage, name: str | None = ..., short_name: str | None = ..., *, metadata: Iterable[syside.Metaclass | syside.MetadataDefinition] = ..., visibility: syside.VisibilityKind | None = ..., defined_by: Iterable[syside.Classifier] = ..., subsets: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., redefines: Iterable[syside.Feature | syside.experimental.expressions.FeatureChainTemplate] = ..., verified_requirement: syside.RequirementUsage | None = ..., multiplicity: syside.experimental.expressions.MultiplicityTemplate | None = ..., ordered: bool = ..., nonunique: bool = ..., equals: syside.experimental.expressions.ExpressionLike | None = ..., default: bool = ..., initial: bool = ...) syside.RequirementUsage
Create
[<visibility>] verify [#<metadata>] requirement <short_name> <name> ::> <verified_requirement> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.There are two ways to write a verified requirement in the textual syntax: the declaration
verify requirement ...;, and the reference shorthandverify <verified_requirement>;, which declares no usage of its own.verified_requirement=writes the shorthand’s reference; with a name, the declaration writes it as::> <verified_requirement>. The specialization clauses combine with either.- Parameters:
owner – The element to create the new verified requirement in.
name – The abstract syntax’s
declaredName: the declared long name.short_name – The abstract syntax’s
declaredShortName: the<...>short name.metadata – The
#prefixes of the declaration: each metaclass becomes oneMetadataUsagetyped by it, written#Mbefore the keyword (afterendon an end usage).visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.defined_by – The
:/defined byclause: each type becomes oneFeatureTyping.subsets – The
:>/subsetsclause: each entry becomes oneSubsetting. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.redefines – The
:>>/redefinesclause: each entry becomes oneRedefinition. An entry is a feature, or achain()of two or more features standing for the feature chaina.bwritten by joining them.verified_requirement – The requirement usage the member references: the reference form
verify <verified_requirement>;, an alternative to declaring a usage of its own. It keeps its own owner.multiplicity – The
[...]clause, built bybounds():bounds(4)writes[4],bounds(1, INFINITY)writes[1..*].ordered – The
orderedkeyword: the feature’s values are ordered.nonunique – The
nonuniquekeyword: the feature’s values may repeat.equals – The
=clause: anExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized toref(...)/literal(...)), instantiated as the usage’s feature value.Noneleaves the usage without a value expression.default – The
defaultkeyword before the value:equalsis a default value, which a redefinition may override, where a plain value is fixed.part def D { attribute x default = 1; }. Needsequals=.initial –
:=in place of=:equalsis an initial value, which the feature has at the start and may change from, where=binds it for good. Only a feature that may vary in time, one owned by an occurrence definition or usage, may have an initial value (KerMLvalidateFeatureValueIsInitial); elsewhere validation reports it.part def D { attribute x := 1; }. Needsequals=.
- Returns:
The new
syside.RequirementUsage.- Raises:
ValueError – If
defaultorinitialis given withoutequals: each describes the value.TypeError – If
visibilityis not asyside.VisibilityKind.TypeError – If an entry of
metadatais neither asyside.Metaclassnor asyside.MetadataDefinition.TypeError – If an entry of
defined_byis nosyside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).TypeError – If
multiplicityis not a template built bybounds().
- new_alias(owner: syside.Definition | syside.Package | syside.Usage, for_: syside.Element, name: str | None = ..., short_name: str | None = ..., *, visibility: syside.VisibilityKind | None = ...) syside.Membership
Create
[<visibility>] alias <short_name> <name> for <for_>;.The new alias goes in
owner, through aMembership.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no alias can be written in their bodies. Passing one raisesTypeError.An alias creates no element:
for_keeps its own owner, and this adds a name for it inowner. The returnedMembershipis what carries the name – reading it back isget_nameon the membership, not on the element it names.- Parameters:
owner – The namespace to create the new alias in.
for – The element the alias names. It keeps its own owner: an alias adds a name in
owner, not a second copy of the element.name – The abstract syntax’s
memberName: the name the alias gives the element inowner.short_name – The abstract syntax’s
memberShortName: the<...>short name the alias gives the element inowner.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.
- Returns:
The new
syside.Membership: the alias itself, not the element it names.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.
- new_expose(owner: syside.ViewUsage, imported: syside.Membership, *, recursive: bool = ..., filters: None = ...) syside.MembershipExpose
Create
expose <imported> [::**];. Createexpose <imported>::* [::**];. Createexpose <imported> [::**] [<filters>];.An expose is an import a view usage owns (SysML
validateExposeOwningNamespace): what is exposed keeps its own owner, and the view’sexposed_elementis derived from its exposes. The textual syntax states no visibility and noall:validateExposeVisibilityandvalidateExposeIsImportAllfix them toprotectedandTrue, which is how the expose is created. The target’s type selects the produced kind, as fornew_import;filters=selects the filtered form.- Parameters:
owner – The view usage to create the new expose in.
imported – What the view exposes: a
Membership– one name, usually the exposed element’sowning_membership(expose P::X;) – or aNamespace, every member of which is exposed (expose P::*;). It keeps its own owner: the expose references it.recursive – The
::**suffix: import the members of every nested namespace too, recursively.filters – The
[<expression>]conditions after the import: each entry is anExpressionTemplate, a bare model element, or a Python primitive, and becomes oneElementFilterMembershipof the anonymous package the import then imports, in the order given.Nonebuilds the unfiltered import.
- Returns:
The new expose – a
syside.MembershipExposefor a membership, asyside.NamespaceExposefor a namespace or withfilters– the expose itself, not what it exposes.- Raises:
ValueError – If
filtersis empty: the grammar requires at least one.
- new_expose(owner: syside.ViewUsage, imported: syside.Namespace, *, recursive: bool = ..., filters: None = ...) syside.NamespaceExpose
- new_expose(owner: syside.ViewUsage, imported: syside.Membership | syside.Namespace, *, recursive: bool = ..., filters: Iterable[syside.experimental.expressions.ExpressionLike]) syside.NamespaceExpose
- new_first(owner: syside.ActionDefinition | syside.ActionUsage, for_: syside.ActionUsage, *, visibility: syside.VisibilityKind | None = ...) syside.Membership
Create
[<visibility>] first <for_>;.The new initial node goes in
owner, through aMembership.ownermay not be ansyside.ExhibitStateUsage,syside.FlowDefinition,syside.FlowUsage,syside.ForLoopActionUsage,syside.IfActionUsage,syside.StateDefinition,syside.StateUsage,syside.SuccessionFlowUsageorsyside.WhileLoopActionUsage: no initial node can be written in their bodies. Passing one raisesTypeError.An initial node creates no element and no succession:
for_keeps its own owner, and a followingthenmember (new_succession) is what orders the body. The returnedMembershipis the initial node itself.- Parameters:
owner – The action definition or usage whose body starts at
for_.for – The action the body starts at, written after
first:start, which every action inherits fromActions::Action, or an action usage of the body. It keeps its own owner.visibility – The visibility indicator before the member.
None, the default, writes no indicator, and the member ispublic.
- Returns:
The new
syside.Membership: the initial node itself, not the action it names.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.TypeError – If
visibilityis not asyside.VisibilityKind.
- new_import(owner: syside.Definition | syside.Package | syside.Usage, imported: syside.Membership, *, visibility: syside.VisibilityKind = ..., import_all: bool = ..., recursive: bool = ..., filters: None = ...) syside.MembershipImport
Create
<visibility> import [all] <imported> [::**];. Create<visibility> import [all] <imported>::* [::**];. Create<visibility> import [all] <imported> [::**] [<filters>];.With
importedasyside.Membership, the new membership import goes inowner, through aMembershipImport.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no membership import can be written in their bodies. Passing one raisesTypeError.With
importedasyside.Namespace, the new namespace import goes inowner, through aNamespaceImport.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no namespace import can be written in their bodies. Passing one raisesTypeError.With
filtersgiven, the new namespace import goes inowner, through aNamespaceImport.ownermay not be asyside.ConjugatedPortDefinition,syside.EnumerationDefinition,syside.ForLoopActionUsage,syside.IfActionUsageorsyside.WhileLoopActionUsage: no namespace import can be written in their bodies. Passing one raisesTypeError.What is imported keeps its own owner: the returned import references it. The target’s type selects the produced kind – the two are disjoint in the metamodel, so the choice is the caller’s alone: pass a membership (usually the element’s
owning_membership) forimport P::X;, the namespace itself forimport P::*;.- Parameters:
owner – The namespace to create the new import in.
imported – What the import makes visible: a
Membership– one name, usually the imported element’sowning_membership(import P::X;) – or aNamespace, every member of which becomes visible (import P::*;). It keeps its own owner: the import references it.visibility – The visibility indicator before
import. Written explicitly whatever is passed: the textual syntax requires imports to state their visibility, andprivateis the KerML default.import_all – The
allkeyword afterimport: import the members whatever their visibility, the private and protected ones too.recursive – The
::**suffix: import the members of every nested namespace too, recursively.filters – The
[<expression>]conditions after the import: each entry is anExpressionTemplate, a bare model element, or a Python primitive, and becomes oneElementFilterMembershipof the anonymous package the import then imports, in the order given.Nonebuilds the unfiltered import.
- Returns:
The new import – a
syside.MembershipImportfor a membership, asyside.NamespaceImportfor a namespace – the import itself, not what it imports.- Raises:
TypeError – If
owner’s kind is not admissible; the message names the admissible kinds.ValueError – If
filtersis empty: the grammar requires at least one.TypeError – If
visibilityis not asyside.VisibilityKind.
- new_import(owner: syside.Definition | syside.Package | syside.Usage, imported: syside.Namespace, *, visibility: syside.VisibilityKind = ..., import_all: bool = ..., recursive: bool = ..., filters: None = ...) syside.NamespaceImport
- new_import(owner: syside.Definition | syside.Package | syside.Usage, imported: syside.Membership | syside.Namespace, *, visibility: syside.VisibilityKind = ..., import_all: bool = ..., recursive: bool = ..., filters: Iterable[syside.experimental.expressions.ExpressionLike]) syside.NamespaceImport
- resolve(model: syside.Model | syside.UnlockedModel, on_retargeted: Callable[[syside.Element, syside.UnexpectedDifferentReference], None] | None = ...) syside.Diagnostics
Re-run semantic resolution and validation over
model’s user documents.Builder calls edit the abstract syntax only. Everything the semantic analyser derives – resolution of textual references, implied relationships, inherited members – is computed once, when the model is loaded, and does not update as the tree changes: a reference that failed to resolve stays failed after the import that would satisfy it is built, and a reference to a name only a constructor created stays failed too. Call this after building to bring the derived state up to date with the tree.
Concretely, every user document is
sema_reset(dropping its implied relationships and un-resolving its references – builder-created relationships keep their targets and re-resolve by them) and then run through the same pipeline stages loading runs, with the model’s own index and standard library cache. The documents end where loading leaves them,BuildState.Validated, so a re-resolved model compares against a freshly loaded one state for state.- Parameters:
model – The model whose user documents to re-resolve.
on_retargeted – Called when un-resolving finds a resolved reference whose text no longer matches its target – a sign the tree was edited inconsistently. By default the core prints such conflicts to standard error.
- Returns:
The diagnostics the semantic and validation stages reported, in the shape loading returns them (its
parserlist stays empty: nothing is re-parsed).