builder

Labs

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 one prefix= 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 in syside.experimental.expressions and 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

ConstructionWarning

The arguments of a constructor call make the model invalid wherever it is placed.

Functions

new_action_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] action def <short_name> <name> :> <specializes>;.

new_allocation_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] allocation def <short_name> <name> :> <specializes>;.

new_analysis_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] analysis def <short_name> <name> :> <specializes> { <result> }.

new_attribute_def

Create [<visibility>] [<prefix>] [#<metadata>] attribute def <short_name> <name> :> <specializes>;.

new_calc_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] calc def <short_name> <name> :> <specializes> { <result> }.

new_case_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] case def <short_name> <name> :> <specializes> { <result> }.

new_comment

Create [<visibility>] comment <short_name> <name> about <about> locale <locale> <body>.

new_concern_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] concern def <short_name> <name> :> <specializes>;.

new_connection_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] connection def <short_name> <name> :> <specializes>;.

new_constraint_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] constraint def <short_name> <name> :> <specializes> { <result> }.

new_def

Create [<visibility>] [<prefix>] #<metadata> def <short_name> <name> :> <specializes>;.

new_dependency

Create [<visibility>] [#<metadata>] dependency <short_name> <name> from <clients> to <suppliers>;.

new_doc

Create [<visibility>] doc <short_name> <name> locale <locale> <body>.

new_enum_def

Create [<visibility>] [#<metadata>] enum def <short_name> <name> :> <specializes>;.

new_flow_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] flow def <short_name> <name> :> <specializes>;.

new_interface_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] interface def <short_name> <name> :> <specializes>;.

new_item_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] item def <short_name> <name> :> <specializes>;.

new_library_package

Create [<visibility>] [standard] library [#<metadata>] package <short_name> <name> { filter <filters>; }.

new_metadata

Create [<visibility>] [#<metadata>] metadata <short_name> <name> : <defined_by> about <about>;.

new_metadata_def

Create [<visibility>] [<prefix>] [#<metadata>] metadata def <short_name> <name> :> <specializes>;.

new_occurrence_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] occurrence def <short_name> <name> :> <specializes>;.

new_package

Create [<visibility>] [#<metadata>] package <short_name> <name> { filter <filters>; } inside owner.

new_part_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] part def <short_name> <name> :> <specializes>;.

new_port_def

Create [<visibility>] [<prefix>] [#<metadata>] port def <short_name> <name> :> <specializes>;.

new_rendering_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] rendering def <short_name> <name> :> <specializes>;.

new_rep

Create [<visibility>] rep <short_name> <name> language <language> <body>.

new_requirement_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] requirement def <short_name> <name> :> <specializes>;.

new_state_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] state def <short_name> <name> :> <specializes> [parallel { }].

new_use_case_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] use case def <short_name> <name> :> <specializes> { <result> }.

new_verification_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] verification def <short_name> <name> :> <specializes> { <result> }.

new_view_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] view def <short_name> <name> :> <specializes> { filter <filters>; }.

new_viewpoint_def

Create [<visibility>] [<prefix>] [individual] [#<metadata>] viewpoint def <short_name> <name> :> <specializes>;.

new_attribute

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

new_binding

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

new_enum

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

new_ref

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

new_succession

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

new_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>;.

new_allocation

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

new_connection

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

new_event_occurrence

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

new_flow

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

new_interface

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

new_item

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

new_message

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

new_occurrence

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

new_part

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

new_port

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

new_rendering

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

new_succession_flow

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

new_view

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>; }.

new_action

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

new_analysis

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

new_assert_constraint

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

new_calc

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

new_case

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

new_concern

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

new_constraint

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

new_exhibit_state

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 { }].

new_guarded_succession

Create [<visibility>] succession <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] first <source> if <guard> then <target>;.

new_include_use_case

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

new_perform_action

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

new_requirement

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

new_satisfy_requirement

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

new_state

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 { }].

new_transition

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

new_use_case

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

new_verification

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

new_viewpoint

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

new_accept

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

new_assign

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

new_decide

Create [<visibility>] [<direction>] [derived] [<prefix>] [constant] [individual] [<portion>] [#<metadata>] decide <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique];.

new_for

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> { ... }.

new_fork

Create [<visibility>] [<direction>] [derived] [<prefix>] [constant] [individual] [<portion>] [#<metadata>] fork <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique];.

new_if

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> { ... }].

new_join

Create [<visibility>] [<direction>] [derived] [<prefix>] [constant] [individual] [<portion>] [#<metadata>] join <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique];.

new_merge

Create [<visibility>] [<direction>] [derived] [<prefix>] [constant] [individual] [<portion>] [#<metadata>] merge <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique];.

new_send

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

new_terminate

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

new_while

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

new_actor

Create [<visibility>] actor [#<metadata>] <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.

new_assume

Create [<visibility>] assume [#<metadata>] constraint <short_name> <name> ::> <assumed_constraint> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> { <result> }.

new_frame

Create [<visibility>] frame [#<metadata>] concern <short_name> <name> ::> <framed_concern> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.

new_objective

Create [<visibility>] objective [#<metadata>] <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.

new_render

Create [<visibility>] render [#<metadata>] rendering <short_name> <name> ::> <rendering> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.

new_require

Create [<visibility>] require [#<metadata>] constraint <short_name> <name> ::> <required_constraint> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals> { <result> }.

new_stakeholder

Create [<visibility>] stakeholder [#<metadata>] <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.

new_subject

Create [<visibility>] subject [#<metadata>] <short_name> <name> ::> <references> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.

new_verify

Create [<visibility>] verify [#<metadata>] requirement <short_name> <name> ::> <verified_requirement> : <defined_by> :> <subsets> :>> <redefines> <multiplicity> [ordered] [nonunique] [default] [:]= <equals>;.

new_alias

Create [<visibility>] alias <short_name> <name> for <for_>;.

new_expose

Create expose <imported> [::**];. Create expose <imported>::* [::**];. Create expose <imported> [::**] [<filters>];.

new_first

Create [<visibility>] first <for_>;.

new_import

Create <visibility> import [all] <imported> [::**];. Create <visibility> import [all] <imported>::* [::**];. Create <visibility> import [all] <imported> [::**] [<filters>];.

resolve

Re-run semantic resolution and validation over model’s user documents.


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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no action definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.ActionDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no allocation definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.AllocationDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no analysis case definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

  • 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 to ref(...) / literal(...)).

Returns:

The new syside.AnalysisCaseDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no attribute definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • specializes – The :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.AttributeDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no calculation definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

  • 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 to ref(...) / literal(...)).

Returns:

The new syside.CalculationDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no case definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

  • 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 to ref(...) / literal(...)).

Returns:

The new syside.CaseDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no comment can be written in their bodies. Passing one raises TypeError.

With a relationship owner, the new comment goes in owner, through an Annotation.

owner may not be an syside.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.VariantMembership or syside.ViewRenderingMembership: no comment can be written in their bodies. Passing one raises TypeError.

visibility may not be given for a syside.Dependency, syside.Membership, syside.MembershipExpose, syside.MembershipImport, syside.NamespaceExpose or syside.NamespaceImport owner: no visibility indicator can be written in their bodies. Passing one raises TypeError.

A relationship owner is 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 is public.

  • about – The about clause: each element becomes one Annotation. Left empty, the annotating element annotates the element that owns it.

  • locale – The locale clause, 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 visibility is not a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no concern definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.ConcernDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no connection definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.ConnectionDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no constraint definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

  • 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 to ref(...) / literal(...)).

Returns:

The new syside.ConstraintDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before def. Mandatory here, and the grammar requires at least one: the prefixes are what extend the plain def.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • specializes – The :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.Definition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • ValueError – If metadata is empty: the grammar requires at least one.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no dependency can be written in their bodies. Passing one raises TypeError.

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 one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • 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 clients is empty: the grammar requires at least one.

  • ValueError – If suppliers is empty: the grammar requires at least one.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no documentation comment can be written in their bodies. Passing one raises TypeError.

With a relationship owner, the new documentation comment goes in owner, through an Annotation.

owner may not be an syside.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.VariantMembership or syside.ViewRenderingMembership: no documentation comment can be written in their bodies. Passing one raises TypeError.

visibility may not be given for a syside.Dependency, syside.Membership, syside.MembershipExpose, syside.MembershipImport, syside.NamespaceExpose or syside.NamespaceImport owner: no visibility indicator can be written in their bodies. Passing one raises TypeError.

A relationship owner is 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 is public.

  • locale – The locale clause, 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 visibility is not a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no enumeration definition can be written in their bodies. Passing one raises TypeError.

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 one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • specializes – The :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.EnumerationDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no flow definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.FlowDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no interface definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.InterfaceDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no item definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.ItemDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no library package can be written in their bodies. Passing one raises TypeError.

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 one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • standard – The standard prefix: the package is part of the standard library rather than a user library.

  • filters – The filter <expression>; members of the body: each entry is an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), and becomes one ElementFilterMembership, in the order given.

Returns:

The new syside.LibraryPackage – the exact kind, never Package (that is new_package’s job).

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no metadata usage can be written in their bodies. Passing one raises TypeError.

With a relationship owner, the new metadata usage goes in owner, through an Annotation.

owner may not be an syside.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.VariantMembership or syside.ViewRenderingMembership: no metadata usage can be written in their bodies. Passing one raises TypeError.

visibility may not be given for a syside.Dependency, syside.Membership, syside.MembershipExpose, syside.MembershipImport, syside.NamespaceExpose or syside.NamespaceImport owner: no visibility indicator can be written in their bodies. Passing one raises TypeError.

A relationship owner is 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping. Mandatory here – a metadata usage says which metadata definition it is an instance of.

  • about – The about clause: each element becomes one Annotation. 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 visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no metadata definition can be written in their bodies. Passing one raises TypeError.

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 one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • specializes – The :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.MetadataDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no occurrence definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.OccurrenceDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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>; } inside owner.

The new package goes in owner, through an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no package can be written in their bodies. Passing one raises TypeError.

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 one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • filters – The filter <expression>; members of the body: each entry is an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), and becomes one ElementFilterMembership, in the order given.

Returns:

The new syside.Package – the exact kind, never LibraryPackage (that is new_library_package’s job).

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no part definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.PartDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no port definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • specializes – The :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.PortDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no rendering definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.RenderingDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no textual representation can be written in their bodies. Passing one raises TypeError.

With a relationship owner, the new textual representation goes in owner, through an Annotation.

owner may not be an syside.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.VariantMembership or syside.ViewRenderingMembership: no textual representation can be written in their bodies. Passing one raises TypeError.

visibility may not be given for a syside.Dependency, syside.Membership, syside.MembershipExpose, syside.MembershipImport, syside.NamespaceExpose or syside.NamespaceImport owner: no visibility indicator can be written in their bodies. Passing one raises TypeError.

A relationship owner is 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 language clause, 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 is public.

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 visibility is not a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no requirement definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.RequirementDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no state definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

  • parallel – The parallel keyword 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 visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no use case definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

  • 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 to ref(...) / literal(...)).

Returns:

The new syside.UseCaseDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no verification case definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

  • 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 to ref(...) / literal(...)).

Returns:

The new syside.VerificationCaseDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no view definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

  • filters – The filter <expression>; members of the body, which select among the elements the view exposes: each entry is an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), and becomes one ElementFilterMembership, 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 visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 an OwningMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no viewpoint definition can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • individual – The individual prefix: 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 :>/specializes clause: each classifier becomes one Subclassification.

Returns:

The new syside.ViewpointDefinition.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no attribute usage can be written in their bodies. Passing one raises TypeError.

Note the Python evaluation trap on equals: equals=literal(2) * 2 builds a multiplication template, but equals=2 * 2 passes the integer 4, because Python evaluates it before this function is called.

With variant=True, the new variant attribute usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant attribute usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return attribute usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return attribute usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end attribute usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant attribute ...;: the new attribute usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return attribute ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no binding can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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 by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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 by bounds(). Needs source=.

  • source_name – The declared name of the source end, written before ::>. Needs source=.

  • 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 by bounds(). Needs target=.

  • target_name – The declared name of the target end, written before ::>. Needs target=.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: 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 visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If source_multiplicity is not a template built by bounds().

  • TypeError – If target_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.EnumerationDefinition

VariantMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no enumeration usage can be written in their bodies. Passing one raises TypeError.

metadata may not be given for an syside.EnumerationDefinition owner: no metadata prefix can be written in its body. Passing one raises TypeError.

direction may not be given for an syside.EnumerationDefinition owner: no direction can be written in its body. Passing one raises TypeError.

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 in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return enumeration usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

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 in owner. The membership kind is derived from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no abstract enumeration usage can be written in their bodies. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end enumeration usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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; owner must be one of the kinds admitting it (see above). "return": the return enum ...; member form, under a ReturnParameterMembership.

  • 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 of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no reference usage can be written in their bodies. Passing one raises TypeError.

visibility may not be given for a syside.MetadataUsage owner: no visibility indicator can be written in its body. Passing one raises TypeError.

With variant=True, the new variant reference usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant reference usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return reference usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return reference usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

visibility may not be given for a syside.ForLoopActionUsage owner: no visibility indicator can be written in its body. Passing one raises TypeError.

direction may not be given with member=”variable”: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given with member=”variable”: the grammar writes no derived prefix there. Passing one raises TypeError.

constant may not be given with member=”variable”: the grammar writes no constant prefix there. Passing one raises TypeError.

crosses may not be given with member=”variable”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a loop variable is not an end. Passing one raises TypeError.

equals may not be given with member=”variable”: the grammar writes no value there. Passing one raises TypeError.

default may not be given with member=”variable”: the grammar writes no default keyword there. Passing one raises TypeError.

initial may not be given with member=”variable”: the grammar writes no initial value there. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end reference usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant ref ...;: the new reference usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return ref ...; member form, under a ReturnParameterMembership. "variable": the loop variable of owner, replacing what the slot holds, under a FeatureMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no succession can be written in their bodies. Passing one raises TypeError.

Both ends reference features that keep their own owners; what the succession owns is the two anonymous end features that subset them. source and target are positional in the model – the first and second declared end – which is how first a then b keeps 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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 by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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 by bounds(). Needs source=.

  • source_name – The declared name of the source end, written before ::>. Needs source=.

  • 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 by bounds(). Needs target=.

  • target_name – The declared name of the target end, written before ::>. Needs target=.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: 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 visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If source_multiplicity is not a template built by bounds().

  • TypeError – If target_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.InterfaceDefinition, syside.InterfaceUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no usage can be written in their bodies. Passing one raises TypeError.

With member="return", the new return usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.InterfaceDefinition, syside.InterfaceUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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; owner must be one of the kinds admitting it (see above). "return": the return ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before 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 is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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 by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • ValueError – If metadata is empty: the grammar requires at least one.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no allocation usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant allocation usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant allocation usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return allocation usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return allocation usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end allocation usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant allocation ...;: the new allocation usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return allocation ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() 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 by bounds(). Needs source=.

  • source_name – The declared name of the source end, written before ::>. Needs source=.

  • 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 by bounds(). Needs target=.

  • target_name – The declared name of the target end, written before ::>. Needs target=.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: 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 constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • ValueError – If source_multiplicity or source_name is given without source: they describe that end.

  • ValueError – If target_multiplicity or target_name is given without target: they describe that end.

  • ValueError – If one of source and target is given without the other: the grammar writes both ends or neither.

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If source_multiplicity is not a template built by bounds().

  • TypeError – If target_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no connection usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant connection usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant connection usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return connection usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return connection usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end connection usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant connection ...;: the new connection usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return connection ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() 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 by bounds(). Needs source=.

  • source_name – The declared name of the source end, written before ::>. Needs source=.

  • 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 by bounds(). Needs target=.

  • target_name – The declared name of the target end, written before ::>. Needs target=.

  • ends – The n-ary form, connect (a, b, d): two or more ends, each built by connector_end(). The alternative to source=/target=.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • ValueError – If source_multiplicity or source_name is given without source: they describe that end.

  • ValueError – If target_multiplicity or target_name is given without target: they describe that end.

  • TypeError – If ends is given with source, target or their details: the n-ary and the binary clause are alternatives.

  • ValueError – If ends lists fewer than two ends.

  • ValueError – If one of source and target is given without the other: the grammar writes both ends or neither.

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If source_multiplicity is not a template built by bounds().

  • TypeError – If target_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no event occurrence usage can be written in their bodies. Passing one raises TypeError.

There are two ways to write an event occurrence usage in the textual syntax: the declaration event occurrence ...;, and the reference shorthand event <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 in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant event occurrence usage can be written in their bodies. Passing one raises TypeError.

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 in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return event occurrence usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end event occurrence usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant event occurrence ...;: the new event occurrence usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return event occurrence ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() 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 by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no flow usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant flow usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant flow usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return flow usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return flow usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end flow usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant flow ...;: the new flow usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return flow ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • 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. None leaves the payload anonymous, the of <type> form.

  • payload_defined_by – The payload’s :/defined by clause: each type becomes one FeatureTyping on the payload. of Fuel is payload_defined_by=[fuel] alone.

  • payload_subsets – The payload’s :>/subsets clause: each entry becomes one Subsetting of the payload. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • payload_references – The payload’s ::>/references clause: the feature becomes the one ReferenceSubsetting the payload may own. A feature, or a chain() of two or more features.

  • payload_redefines – The payload’s :>>/redefines clause: each entry becomes one Redefinition of the payload. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • payload_multiplicity – The payload’s [...] clause, built by bounds().

  • payload_ordered – The ordered keyword on the payload: its values are ordered.

  • payload_equals – The payload’s = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the payload’s value. None leaves the payload without a value.

  • payload_default – The default keyword before the payload’s value: payload_equals is a default value, where a plain value is fixed. flow of x : T default = v from a.o to b.i;. Needs payload_equals=. There is no payload_initial= here: := needs a feature that may vary in time, which a flow’s payload is not (KerML validateFeatureValueIsInitial), so flow of x : T := v ... is invalid wherever the flow is placed.

  • source – The from end: a chain() whose last feature is the flowed feature and whose others are the end’s prefix – chain(t, o, f) writes from t.o.f. Needs target=.

  • target – The to end, as source=: chain(e, i, f) writes to e.i.f. Needs source=.

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 default or initial is given without equals: each describes the value.

  • ValueError – If payload_default is given without payload_equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • ValueError – If one of source and target is given without the other: the grammar writes both ends or neither.

  • ValueError – If source or target is 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 prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.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_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

  • TypeError – If payload_multiplicity is not a template built by bounds().

  • TypeError – If payload_multiplicity, payload_ordered or payload_equals is given without a specialization of the payload (payload_defined_by, payload_subsets, payload_references or payload_redefines), or payload_short_name or payload_name without one: a payload is declared with a specialization (SysML 2.1 8.2.2.16 PayloadFeature).

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no interface usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant interface usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant interface usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return interface usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return interface usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end interface usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant interface ...;: the new interface usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return interface ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() 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 by bounds(). Needs source=.

  • source_name – The declared name of the source end, written before ::>. Needs source=.

  • 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 by bounds(). Needs target=.

  • target_name – The declared name of the target end, written before ::>. Needs target=.

  • ends – The n-ary form, connect (pa, pb, pd): two or more ports’ ends, each built by connector_end(). The alternative to source=/target=.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • ValueError – If source_multiplicity or source_name is given without source: they describe that end.

  • ValueError – If target_multiplicity or target_name is given without target: they describe that end.

  • TypeError – If ends is given with source, target or their details: the n-ary and the binary clause are alternatives.

  • ValueError – If ends lists fewer than two ends.

  • ValueError – If one of source and target is given without the other: the grammar writes both ends or neither.

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If source_multiplicity is not a template built by bounds().

  • TypeError – If target_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no item usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant item usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant item usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return item usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return item usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end item usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant item ...;: the new item usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return item ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no flow usage can be written in their bodies. Passing one raises TypeError.

Every message is abstract, with or without the abstract keyword (SysML 7.16.2), so the new flow usage is always abstract and prefix= offers no "abstract": message m; and abstract message m; are one model.

With variant=True, the new variant flow usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant flow usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return flow usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return flow usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 – True for the variant member form, variant message ...;: the new flow usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return message ...; member form, under a ReturnParameterMembership.

  • prefix – The exclusive prefix keyword, if any. "variation": the declaration is a variation point, whose body holds the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • 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. None leaves the payload anonymous, the of <type> form.

  • payload_defined_by – The payload’s :/defined by clause: each type becomes one FeatureTyping on the payload. of Fuel is payload_defined_by=[fuel] alone.

  • payload_subsets – The payload’s :>/subsets clause: each entry becomes one Subsetting of the payload. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • payload_references – The payload’s ::>/references clause: the feature becomes the one ReferenceSubsetting the payload may own. A feature, or a chain() of two or more features.

  • payload_redefines – The payload’s :>>/redefines clause: each entry becomes one Redefinition of the payload. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • payload_multiplicity – The payload’s [...] clause, built by bounds().

  • payload_ordered – The ordered keyword on the payload: its values are ordered.

  • payload_equals – The payload’s = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the payload’s value. None leaves the payload without a value.

  • payload_default – The default keyword before the payload’s value: payload_equals is a default value, where a plain value is fixed. flow of x : T default = v from a.o to b.i;. Needs payload_equals=. There is no payload_initial= here: := needs a feature that may vary in time, which a flow’s payload is not (KerML validateFeatureValueIsInitial), so flow of x : T := v ... is invalid wherever the flow is placed.

  • source – The from event: the occurrence usage it references, or a chain() ending in one – chain(t, o) writes from t.o. Needs target=.

  • target – The to event, as source=. Needs source=.

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 default or initial is given without equals: each describes the value.

  • ValueError – If payload_default is given without payload_equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • ValueError – If one of source and target is given without the other: the grammar writes both ends or neither.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.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_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

  • TypeError – If payload_multiplicity is not a template built by bounds().

  • TypeError – If payload_multiplicity, payload_ordered or payload_equals is given without a specialization of the payload (payload_defined_by, payload_subsets, payload_references or payload_redefines), or payload_short_name or payload_name without one: a payload is declared with a specialization (SysML 2.1 8.2.2.16 PayloadFeature).

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no occurrence usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant occurrence usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant occurrence usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return occurrence usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return occurrence usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end occurrence usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant occurrence ...;: the new occurrence usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return occurrence ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no part usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant part usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant part usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return part usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return part usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end part usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant part ...;: the new part usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return part ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no port usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant port usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant port usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return port usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return port usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end port usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant port ...;: the new port usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return port ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no rendering usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant rendering usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant rendering usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return rendering usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return rendering usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end rendering usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant rendering ...;: the new rendering usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return rendering ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no succession flow can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • individual – The individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • 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. None leaves the payload anonymous, the of <type> form.

  • payload_defined_by – The payload’s :/defined by clause: each type becomes one FeatureTyping on the payload. of Fuel is payload_defined_by=[fuel] alone.

  • payload_subsets – The payload’s :>/subsets clause: each entry becomes one Subsetting of the payload. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • payload_references – The payload’s ::>/references clause: the feature becomes the one ReferenceSubsetting the payload may own. A feature, or a chain() of two or more features.

  • payload_redefines – The payload’s :>>/redefines clause: each entry becomes one Redefinition of the payload. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • payload_multiplicity – The payload’s [...] clause, built by bounds().

  • payload_ordered – The ordered keyword on the payload: its values are ordered.

  • payload_equals – The payload’s = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the payload’s value. None leaves the payload without a value.

  • payload_default – The default keyword before the payload’s value: payload_equals is a default value, where a plain value is fixed. flow of x : T default = v from a.o to b.i;. Needs payload_equals=. There is no payload_initial= here: := needs a feature that may vary in time, which a flow’s payload is not (KerML validateFeatureValueIsInitial), so flow of x : T := v ... is invalid wherever the flow is placed.

  • source – The from end: a chain() whose last feature is the flowed feature and whose others are the end’s prefix – chain(t, o, f) writes from t.o.f. Needs target=.

  • target – The to end, as source=: chain(e, i, f) writes to e.i.f. Needs source=.

Returns:

The new syside.SuccessionFlowUsage.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • ValueError – If default or initial is given without equals: each describes the value.

  • ValueError – If payload_default is given without payload_equals: each describes the value.

  • ValueError – If one of source and target is given without the other: the grammar writes both ends or neither.

  • ValueError – If source or target is 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 visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.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_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

  • TypeError – If payload_multiplicity is not a template built by bounds().

  • TypeError – If payload_multiplicity, payload_ordered or payload_equals is given without a specialization of the payload (payload_defined_by, payload_subsets, payload_references or payload_redefines), or payload_short_name or payload_name without one: a payload is declared with a specialization (SysML 2.1 8.2.2.16 PayloadFeature).

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no view usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant view usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant view usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return view usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return view usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end view usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant view ...;: the new view usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return view ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • filters – The filter <expression>; members of the body, which select among the elements the view exposes: each entry is an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), and becomes one ElementFilterMembership, 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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no action usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant action usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant action usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return action usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return action usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a ParameterMembership.

metadata may not be given with member=”then”: the grammar writes no metadata prefix there. Passing one raises TypeError.

visibility may not be given for an syside.IfActionUsage owner: no visibility indicator can be written in its body. Passing one raises TypeError.

direction may not be given with member=”then”: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given with member=”then”: the grammar writes no derived prefix there. Passing one raises TypeError.

constant may not be given with member=”then”: the grammar writes no constant prefix there. Passing one raises TypeError.

individual may not be given with member=”then”: the grammar writes no individual prefix there. Passing one raises TypeError.

ref may not be given with member=”then”: the grammar writes no ref prefix there. Passing one raises TypeError.

portion may not be given with member=”then”: the grammar writes no portion prefix there. Passing one raises TypeError.

crosses may not be given with member=”then”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a then body is not an end. Passing one raises TypeError.

equals may not be given with member=”then”: the grammar writes no value there. Passing one raises TypeError.

default may not be given with member=”then”: the grammar writes no default keyword there. Passing one raises TypeError.

initial may not be given with member=”then”: the grammar writes no initial value there. Passing one raises TypeError.

new_action(if_action, "t", defined_by=[AD], member="then") declares the then body: 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 as owner.

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 in owner, through a ParameterMembership.

metadata may not be given with member=”else”: the grammar writes no metadata prefix there. Passing one raises TypeError.

visibility may not be given for an syside.IfActionUsage owner: no visibility indicator can be written in its body. Passing one raises TypeError.

direction may not be given with member=”else”: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given with member=”else”: the grammar writes no derived prefix there. Passing one raises TypeError.

constant may not be given with member=”else”: the grammar writes no constant prefix there. Passing one raises TypeError.

individual may not be given with member=”else”: the grammar writes no individual prefix there. Passing one raises TypeError.

ref may not be given with member=”else”: the grammar writes no ref prefix there. Passing one raises TypeError.

portion may not be given with member=”else”: the grammar writes no portion prefix there. Passing one raises TypeError.

crosses may not be given with member=”else”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and an else body is not an end. Passing one raises TypeError.

equals may not be given with member=”else”: the grammar writes no value there. Passing one raises TypeError.

default may not be given with member=”else”: the grammar writes no default keyword there. Passing one raises TypeError.

initial may not be given with member=”else”: the grammar writes no initial value there. Passing one raises TypeError.

new_action(if_action, "e", member="else") declares the else body: if c { ... } else action e { ... }. An if action has one else slot, 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 as owner.

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 in owner, through a ParameterMembership.

metadata may not be given with member=”body”: the grammar writes no metadata prefix there. Passing one raises TypeError.

visibility may not be given for a syside.ForLoopActionUsage or syside.WhileLoopActionUsage owner: no visibility indicator can be written in their bodies. Passing one raises TypeError.

direction may not be given with member=”body”: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given with member=”body”: the grammar writes no derived prefix there. Passing one raises TypeError.

constant may not be given with member=”body”: the grammar writes no constant prefix there. Passing one raises TypeError.

individual may not be given with member=”body”: the grammar writes no individual prefix there. Passing one raises TypeError.

ref may not be given with member=”body”: the grammar writes no ref prefix there. Passing one raises TypeError.

portion may not be given with member=”body”: the grammar writes no portion prefix there. Passing one raises TypeError.

crosses may not be given with member=”body”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a loop body is not an end. Passing one raises TypeError.

equals may not be given with member=”body”: the grammar writes no value there. Passing one raises TypeError.

default may not be given with member=”body”: the grammar writes no default keyword there. Passing one raises TypeError.

initial may not be given with member=”body”: the grammar writes no initial value there. Passing one raises TypeError.

new_action(loop, "b", member="body") declares the body of a while, loop or for: 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 as owner.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end action usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant action ...;: the new action usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return action ...; member form, under a ReturnParameterMembership. "then": the then body of owner, replacing what the slot holds, under a ParameterMembership. "else": the else body of owner, replacing what the slot holds, under a ParameterMembership. "body": the loop body of owner, replacing what the slot holds, under a ParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no analysis case usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant analysis case usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant analysis case usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return analysis case usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return analysis case usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end analysis case usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant analysis ...;: the new analysis case usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return analysis ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • 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 to ref(...) / 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 equals and result are given: a value and a result expression together have no stated meaning.

  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no assert constraint usage can be written in their bodies. Passing one raises TypeError.

There are two ways to write an assert constraint usage in the textual syntax: the declaration assert constraint ...;, and the reference shorthand assert <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 in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant assert constraint usage can be written in their bodies. Passing one raises TypeError.

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 in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return assert constraint usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end assert constraint usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant assert constraint ...;: the new assert constraint usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return assert constraint ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() 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. A chain() must end in a constraint usage (validateAssertConstraintUsageReference).

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • negated – The not keyword: 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 to ref(...) / 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 equals and result are given: a value and a result expression together have no stated meaning.

  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • ValueError – If asserted_constraint is a chain whose last feature is no ConstraintUsage (validateAssertConstraintUsageReference).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no calculation usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant calculation usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant calculation usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return calculation usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return calculation usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end calculation usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant calc ...;: the new calculation usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return calc ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • 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 to ref(...) / 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 equals and result are given: a value and a result expression together have no stated meaning.

  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no case usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant case usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant case usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return case usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return case usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end case usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant case ...;: the new case usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return case ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • 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 to ref(...) / 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 equals and result are given: a value and a result expression together have no stated meaning.

  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no concern usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant concern usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant concern usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return concern usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return concern usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end concern usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant concern ...;: the new concern usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return concern ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no constraint usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant constraint usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant constraint usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return constraint usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return constraint usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end constraint usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant constraint ...;: the new constraint usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return constraint ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • 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 to ref(...) / 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 equals and result are given: a value and a result expression together have no stated meaning.

  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no exhibit state usage can be written in their bodies. Passing one raises TypeError.

There are two ways to write an exhibit state usage in the textual syntax: the declaration exhibit state ...;, and the reference shorthand exhibit <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 in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant exhibit state usage can be written in their bodies. Passing one raises TypeError.

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 in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return exhibit state usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end exhibit state usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant exhibit state ...;: the new exhibit state usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return exhibit state ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() 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 by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • parallel – The parallel keyword 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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 a FeatureMembership.

owner may not be an syside.ExhibitStateUsage, syside.FlowDefinition, syside.FlowUsage, syside.ForLoopActionUsage, syside.IfActionUsage, syside.StateDefinition, syside.StateUsage, syside.SuccessionFlowUsage or syside.WhileLoopActionUsage: no guarded succession can be written in their bodies. Passing one raises TypeError.

source and target name features that keep their own owners. What the succession owns is the guard expression and the succession between them, whose second end references target.

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 is public.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: 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.ActionUsage is a curated narrowing: the grammar admits any feature here, and the metamodel types the property as an action.

  • guard – The condition written after if: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the succession’s guard expression. Mandatory here – an unguarded succession in an action body is new_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.ActionUsage is 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 visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no include use case usage can be written in their bodies. Passing one raises TypeError.

There are two ways to write an include use case usage in the textual syntax: the declaration include use case ...;, and the reference shorthand include <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 in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant include use case usage can be written in their bodies. Passing one raises TypeError.

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 in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return include use case usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end include use case usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant include use case ...;: the new include use case usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return include use case ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() 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 by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • 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 to ref(...) / 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 equals and result are given: a value and a result expression together have no stated meaning.

  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no perform action usage can be written in their bodies. Passing one raises TypeError.

There are two ways to write a perform action usage in the textual syntax: the declaration perform action ...;, and the reference shorthand perform <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 in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant perform action usage can be written in their bodies. Passing one raises TypeError.

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 in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return perform action usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a StateSubactionMembership.

metadata may not be given for an syside.ExhibitStateUsage, syside.StateDefinition or syside.StateUsage owner: no metadata prefix can be written in their bodies. Passing one raises TypeError.

direction may not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raises TypeError.

constant may not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raises TypeError.

individual may not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raises TypeError.

portion may not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raises TypeError.

A state has at most one action in each of the entry, do and exit positions. 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 in owner, through a StateSubactionMembership.

metadata may not be given for an syside.ExhibitStateUsage, syside.StateDefinition or syside.StateUsage owner: no metadata prefix can be written in their bodies. Passing one raises TypeError.

direction may not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raises TypeError.

constant may not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raises TypeError.

individual may not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raises TypeError.

portion may not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raises TypeError.

A state has at most one action in each of the entry, do and exit positions. 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 in owner, through a StateSubactionMembership.

metadata may not be given for an syside.ExhibitStateUsage, syside.StateDefinition or syside.StateUsage owner: no metadata prefix can be written in their bodies. Passing one raises TypeError.

direction may not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raises TypeError.

constant may not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raises TypeError.

individual may not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raises TypeError.

portion may not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raises TypeError.

A state has at most one action in each of the entry, do and exit positions. 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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end perform action usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant perform action ...;: the new perform action usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return perform action ...; member form, under a ReturnParameterMembership. "entry": the entry action ...; member form, under a StateSubactionMembership. "do": the do action ...; member form, under a StateSubactionMembership. "exit": the exit action ...; member form, under a StateSubactionMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() 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 by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no requirement usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant requirement usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant requirement usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return requirement usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return requirement usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end requirement usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant requirement ...;: the new requirement usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return requirement ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no satisfy requirement usage can be written in their bodies. Passing one raises TypeError.

There are two ways to write a satisfy requirement usage in the textual syntax: the declaration satisfy requirement ...;, and the reference shorthand satisfy <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 in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant satisfy requirement usage can be written in their bodies. Passing one raises TypeError.

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 in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return satisfy requirement usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end satisfy requirement usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant satisfy requirement ...;: the new satisfy requirement usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return satisfy requirement ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() 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. A chain() must end in a requirement usage (validateSatisfyRequirementUsageReference).

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • negated – The not keyword: the usage asserts that the constraint or requirement is false rather than true.

  • satisfied_by – The by clause: the feature, or chain(), that satisfies the requirement. It keeps its own owner; the usage’s subject parameter references it. None omits 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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • ValueError – If satisfied_requirement is a chain whose last feature is no RequirementUsage (validateSatisfyRequirementUsageReference).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no state usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant state usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant state usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return state usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return state usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end state usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant state ...;: the new state usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return state ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • parallel – The parallel keyword 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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 first and then clauses name features that keep their own owners. What the transition owns is the succession between them, whose second end references target; its first end is derived from source.

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 is public.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: 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.ActionUsage is 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. None leaves the payload anonymous, the accept <type> ...; form.

  • payload_defined_by – The payload parameter’s :/defined by clause: each type becomes one FeatureTyping on the payload.

  • payload_subsets – The payload’s :>/subsets clause: each entry becomes one Subsetting of the payload. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • payload_references – The payload’s ::>/references clause: the feature becomes the one ReferenceSubsetting the payload may own. A feature, or a chain() of two or more features.

  • payload_redefines – The payload’s :>>/redefines clause: each entry becomes one Redefinition of the payload. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • payload_multiplicity – The payload’s [...] clause, built by bounds().

  • payload_ordered – The ordered keyword on the payload: its values are ordered.

  • payload_equals – The payload’s = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the payload’s value. None leaves the payload without a value.

  • payload_default – The default keyword before the payload’s value: payload_equals is a default value, where a plain value is fixed. accept x : T default = v;. Needs payload_equals=.

  • payload_initial – := in place of =: payload_equals is an initial value, where = gives a bound one. accept x : T := v;. Needs payload_equals=.

  • trigger – The time or change trigger, at <time>, after <delay> or when <condition>, built by at(), after() or when(). It is the payload parameter’s value; None accepts a payload instead.

  • receiver – The trigger’s via clause: what the payload is accepted via, as an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)). None omits the clause.

  • guard – The condition written after if: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / 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 a PerformActionUsage referencing it. syside.ActionUsage is 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.ActionUsage is 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_default or payload_initial is given without payload_equals: each describes the value.

  • ValueError – If a trigger is given and source is no state: a trigger is valid only on a transition from a state (SysML 2.1 validateTransitionUsageTriggerActions).

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of defined_by is no syside.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_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

  • TypeError – If payload_multiplicity is not a template built by bounds().

  • TypeError – If payload_equals is given with trigger: the trigger is the payload’s value.

  • TypeError – If payload_multiplicity, payload_ordered or payload_equals is given without a specialization of the payload (payload_defined_by, payload_subsets, payload_references or payload_redefines), or payload_short_name, payload_name or receiver without one and without trigger: a payload is declared with a specialization (SysML 2.1 8.2.2.16 PayloadFeature).

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no use case usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant use case usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant use case usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return use case usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return use case usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end use case usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant use case ...;: the new use case usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return use case ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • 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 to ref(...) / 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 equals and result are given: a value and a result expression together have no stated meaning.

  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no verification case usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant verification case usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant verification case usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return verification case usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return verification case usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

crosses may not be given with member=”return”: only an end feature crosses (KerML validateCrossSubsettingCrossingFeature), and a return parameter is not an end. Passing one raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end verification case usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant verification ...;: the new verification case usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return verification ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • conjugates – The ~ form of the :/defined by clause: each conjugated port definition becomes one ConjugatedPortTyping. A port definition’s conjugate is its conjugated_port_definition.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • crosses – The =>/crosses rider: the chain() of exactly two features this end crosses, written => e1.x. It becomes the one CrossSubsetting a feature may own.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • 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 to ref(...) / 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 equals and result are given: a value and a result expression together have no stated meaning.

  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 from owner’s kind:

owner

membership kind

syside.Definition

FeatureMembership

syside.Package

OwningMembership

syside.Usage

FeatureMembership

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no viewpoint usage can be written in their bodies. Passing one raises TypeError.

With variant=True, the new variant viewpoint usage goes in owner, through a VariantMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no variant viewpoint usage can be written in their bodies. Passing one raises TypeError.

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 reference variant <references>; (SysML 8.2.2.6.3).

With member="return", the new return viewpoint usage goes in owner, through a ReturnParameterMembership.

owner may not be a syside.ConcernDefinition, syside.RequirementDefinition, syside.RequirementUsage, syside.SatisfyRequirementUsage, syside.ViewpointDefinition or syside.ViewpointUsage: no return viewpoint usage can be written in their bodies. Passing one raises TypeError.

With member=”return”, direction admits only Out: a return parameter’s direction is fixed to out (KerML 8.3.4.7.8). Passing another value raises TypeError.

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 in owner, through a FeatureMembership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage, syside.MetadataUsage or syside.WhileLoopActionUsage: no end viewpoint usage can be written in their bodies. Passing one raises TypeError.

direction may not be given with prefix=”end”: an end feature has no direction (KerML validateFeatureEndNoDirection). Passing one raises TypeError.

derived may not be given with prefix=”end”: an end feature is never derived (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

constant may not be given with prefix=”end”: the grammar writes no constant after end. Passing one raises TypeError.

individual may not be given with prefix=”end”: the grammar writes no individual after end. Passing one raises TypeError.

ref may not be given with prefix=”end”: the grammar writes no ref after end. Passing one raises TypeError.

portion may not be given with prefix=”end”: an end feature is never a portion (KerML validateFeatureEndNotDerivedAbstractCompositeOrPortion). Passing one raises TypeError.

An end member is what makes a concrete connection definition validate: a concrete association must have at least two related elements, and the end features are what relates them. Outside an association an end feature still has multiplicity 1..1 and 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 – True for the variant member form, variant viewpoint ...;: the new viewpoint usage then goes in a VariantMembership, and owner must 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; owner must be one of the kinds admitting it (see above). "return": the return viewpoint ...; member form, under a ReturnParameterMembership.

  • 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 the variant members it can be bound to. "end": the usage is an end feature of owner; 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() 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. Any cross_* argument creates the cross feature; it is valid only with prefix="end".

  • cross_short_name – The <...> short name of the end’s owned cross feature.

  • cross_multiplicity – The cross multiplicity, the [...] after end, built by bounds(): from one value of the other end, how many values of this end there are across the connections. end [1..*] part d is cross_multiplicity=bounds(1, INFINITY); the end’s own multiplicity= is always 1..1.

  • cross_ordered – ordered on the end’s owned cross feature: this end’s values across the connections from one value of the other end are ordered.

  • cross_nonunique – nonunique on 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 one Subsetting of the cross feature. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*]. With prefix="end" it admits only 1..1, an end feature’s own multiplicity (KerML validateFeatureEndMultiplicity); end [1..*] part d writes cross_multiplicity=.

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

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 default or initial is given without equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If prefix is "end" and multiplicity is a bound other than 1..1 without a feature reference.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If cross_multiplicity is not a template built by bounds().

  • TypeError – If multiplicity is not a template built by bounds().

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 a FeatureMembership.

owner may not be a syside.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.ViewpointUsage or syside.WhileLoopActionUsage: no accept action usage can be written in their bodies. Passing one raises TypeError.

With member="entry", the new entry accept action usage goes in owner, through a StateSubactionMembership.

metadata may not be given for an syside.ExhibitStateUsage, syside.StateDefinition or syside.StateUsage owner: no metadata prefix can be written in their bodies. Passing one raises TypeError.

direction may not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raises TypeError.

constant may not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raises TypeError.

individual may not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raises TypeError.

ref may not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raises TypeError.

portion may not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raises TypeError.

A state has at most one action in each of the entry, do and exit positions. 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 in owner, through a StateSubactionMembership.

metadata may not be given for an syside.ExhibitStateUsage, syside.StateDefinition or syside.StateUsage owner: no metadata prefix can be written in their bodies. Passing one raises TypeError.

direction may not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raises TypeError.

constant may not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raises TypeError.

individual may not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raises TypeError.

ref may not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raises TypeError.

portion may not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raises TypeError.

A state has at most one action in each of the entry, do and exit positions. 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 in owner, through a StateSubactionMembership.

metadata may not be given for an syside.ExhibitStateUsage, syside.StateDefinition or syside.StateUsage owner: no metadata prefix can be written in their bodies. Passing one raises TypeError.

direction may not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raises TypeError.

constant may not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raises TypeError.

individual may not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raises TypeError.

ref may not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raises TypeError.

portion may not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raises TypeError.

A state has at most one action in each of the entry, do and exit positions. 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; owner must be one of the kinds admitting it (see above). "entry": the entry accept ...; member form, under a StateSubactionMembership. "do": the do accept ...; member form, under a StateSubactionMembership. "exit": the exit accept ...; member form, under a StateSubactionMembership.

  • 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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: 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. None leaves the payload anonymous, the accept <type> ...; form.

  • payload_defined_by – The payload parameter’s :/defined by clause: each type becomes one FeatureTyping on the payload.

  • payload_subsets – The payload’s :>/subsets clause: each entry becomes one Subsetting of the payload. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • payload_references – The payload’s ::>/references clause: the feature becomes the one ReferenceSubsetting the payload may own. A feature, or a chain() of two or more features.

  • payload_redefines – The payload’s :>>/redefines clause: each entry becomes one Redefinition of the payload. An entry is a feature, or a chain() of two or more features standing for their feature chain.

  • payload_multiplicity – The payload’s [...] clause, built by bounds().

  • payload_ordered – The ordered keyword on the payload: its values are ordered.

  • payload_equals – The payload’s = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the payload’s value. None leaves the payload without a value.

  • payload_default – The default keyword before the payload’s value: payload_equals is a default value, where a plain value is fixed. accept x : T default = v;. Needs payload_equals=.

  • payload_initial – := in place of =: payload_equals is an initial value, where = gives a bound one. accept x : T := v;. Needs payload_equals=.

  • trigger – The time or change trigger, at <time>, after <delay> or when <condition>, built by at(), after() or when(). It is the payload parameter’s value; None accepts a payload instead.

  • receiver – The via clause: what the payload is accepted via, as an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)). None omits 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_default or payload_initial is given without payload_equals: each describes the value.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.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_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

  • TypeError – If payload_multiplicity is not a template built by bounds().

  • TypeError – If none of payload_defined_by, payload_subsets, payload_references, payload_redefines or trigger is given: accept writes a payload with a specialization, or a trigger.

  • TypeError – If payload_equals is given with trigger: the trigger is the payload’s value.

  • TypeError – If payload_multiplicity, payload_ordered or payload_equals is given without a specialization of the payload (payload_defined_by, payload_subsets, payload_references or payload_redefines), or payload_short_name, payload_name or receiver without one and without trigger: a payload is declared with a specialization (SysML 2.1 8.2.2.16 PayloadFeature).

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 a FeatureMembership.

owner may not be a syside.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.ViewpointUsage or syside.WhileLoopActionUsage: no assignment action usage can be written in their bodies. Passing one raises TypeError.

With member="entry", the new entry assignment action usage goes in owner, through a StateSubactionMembership.

metadata may not be given for an syside.ExhibitStateUsage, syside.StateDefinition or syside.StateUsage owner: no metadata prefix can be written in their bodies. Passing one raises TypeError.

direction may not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raises TypeError.

constant may not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raises TypeError.

individual may not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raises TypeError.

ref may not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raises TypeError.

portion may not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raises TypeError.

A state has at most one action in each of the entry, do and exit positions. 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 in owner, through a StateSubactionMembership.

metadata may not be given for an syside.ExhibitStateUsage, syside.StateDefinition or syside.StateUsage owner: no metadata prefix can be written in their bodies. Passing one raises TypeError.

direction may not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raises TypeError.

constant may not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raises TypeError.

individual may not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raises TypeError.

ref may not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raises TypeError.

portion may not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raises TypeError.

A state has at most one action in each of the entry, do and exit positions. 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 in owner, through a StateSubactionMembership.

metadata may not be given for an syside.ExhibitStateUsage, syside.StateDefinition or syside.StateUsage owner: no metadata prefix can be written in their bodies. Passing one raises TypeError.

direction may not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raises TypeError.

constant may not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raises TypeError.

individual may not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raises TypeError.

ref may not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raises TypeError.

portion may not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raises TypeError.

A state has at most one action in each of the entry, do and exit positions. 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; owner must be one of the kinds admitting it (see above). "entry": the entry assign ...; member form, under a StateSubactionMembership. "do": the do assign ...; member form, under a StateSubactionMembership. "exit": the exit assign ...; member form, under a StateSubactionMembership.

  • 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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: 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 of assigned_target=’s chain(), or for no target at all (the occurrence owning the action).

  • assigned_target – What follows assign: a feature, which the action assigns to, or a chain(), split as the text assign c.v.speed is – its first feature the target object, the rest the feature assigned to (SysML 2.1 7.17.9). With target_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 :=: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / 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 constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • ValueError – If target_object is a feature reference, which is the first feature of a assigned_target chain.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 a FeatureMembership.

owner may not be an syside.ExhibitStateUsage, syside.FlowDefinition, syside.FlowUsage, syside.ForLoopActionUsage, syside.IfActionUsage, syside.StateDefinition, syside.StateUsage, syside.SuccessionFlowUsage or syside.WhileLoopActionUsage: no decision node can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: 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 constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 a FeatureMembership.

owner may not be a syside.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.ViewpointUsage or syside.WhileLoopActionUsage: no for loop action usage can be written in their bodies. Passing one raises TypeError.

The { ... } body is created empty: reach it through get_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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • variable_name – The declared name of the loop variable, written after for. None leaves the variable anonymous. The variable itself is reached through get_loop_variable().

  • sequence – What the loop iterates over, written after in: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / 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 constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 a FeatureMembership.

owner may not be an syside.ExhibitStateUsage, syside.FlowDefinition, syside.FlowUsage, syside.ForLoopActionUsage, syside.IfActionUsage, syside.StateDefinition, syside.StateUsage, syside.SuccessionFlowUsage or syside.WhileLoopActionUsage: no fork node can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: 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 constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 a FeatureMembership.

owner may not be a syside.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.ViewpointUsage or syside.WhileLoopActionUsage: no if action usage can be written in their bodies. Passing one raises TypeError.

The { ... } body is created empty: reach it through get_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=True adds an empty else { ... } body, reached through get_else_body() and populated the same way. else_if= nests a further if in that branch instead, reached through get_else_body(); its bodies are reached as above.

With member="else", the new else if goes in owner, through a ParameterMembership.

visibility may not be given for an syside.IfActionUsage owner: no visibility indicator can be written in its body. Passing one raises TypeError.

With member=”else”, direction admits only In: an else action is a parameter membership’s member parameter, whose direction is in (KerML validateParameterMembershipParameterDirection). Passing another value raises TypeError.

An if action has one else slot, so member="else" replaces whatever the slot held – an else body, or an earlier else-if – as else_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; owner must be one of the kinds admitting it (see above). "else": the else if of owner, replacing what the slot holds, under a ParameterMembership.

  • 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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • condition – The condition written after if: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the node’s condition argument.

  • else_body – True adds an empty else { ... } body, reached through get_else_body() and populated as the then body is. An alternative to else_if: an if action has one else branch.

  • else_if – The condition of a nested else if: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)). The nested if action is reached through get_else_body() (narrowed to IfActionUsage), and its bodies as this one’s. An alternative to else_body; None writes no else 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_body and else_if are given: they are alternatives for the one else { ... } branch.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 a FeatureMembership.

owner may not be an syside.ExhibitStateUsage, syside.FlowDefinition, syside.FlowUsage, syside.ForLoopActionUsage, syside.IfActionUsage, syside.StateDefinition, syside.StateUsage, syside.SuccessionFlowUsage or syside.WhileLoopActionUsage: no join node can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: 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 constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 a FeatureMembership.

owner may not be an syside.ExhibitStateUsage, syside.FlowDefinition, syside.FlowUsage, syside.ForLoopActionUsage, syside.IfActionUsage, syside.StateDefinition, syside.StateUsage, syside.SuccessionFlowUsage or syside.WhileLoopActionUsage: no merge node can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: 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 constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 a FeatureMembership.

owner may not be a syside.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.ViewpointUsage or syside.WhileLoopActionUsage: no send action usage can be written in their bodies. Passing one raises TypeError.

With member="entry", the new entry send action usage goes in owner, through a StateSubactionMembership.

metadata may not be given for an syside.ExhibitStateUsage, syside.StateDefinition or syside.StateUsage owner: no metadata prefix can be written in their bodies. Passing one raises TypeError.

direction may not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raises TypeError.

constant may not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raises TypeError.

individual may not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raises TypeError.

ref may not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raises TypeError.

portion may not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raises TypeError.

A state has at most one action in each of the entry, do and exit positions. 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 in owner, through a StateSubactionMembership.

metadata may not be given for an syside.ExhibitStateUsage, syside.StateDefinition or syside.StateUsage owner: no metadata prefix can be written in their bodies. Passing one raises TypeError.

direction may not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raises TypeError.

constant may not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raises TypeError.

individual may not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raises TypeError.

ref may not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raises TypeError.

portion may not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raises TypeError.

A state has at most one action in each of the entry, do and exit positions. 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 in owner, through a StateSubactionMembership.

metadata may not be given for an syside.ExhibitStateUsage, syside.StateDefinition or syside.StateUsage owner: no metadata prefix can be written in their bodies. Passing one raises TypeError.

direction may not be given for a state’s entry, do or exit action: the grammar writes no direction there. Passing one raises TypeError.

derived may not be given for a state’s entry, do or exit action: the grammar writes no derived there. Passing one raises TypeError.

constant may not be given for a state’s entry, do or exit action: the grammar writes no constant there. Passing one raises TypeError.

individual may not be given for a state’s entry, do or exit action: the grammar writes no individual there. Passing one raises TypeError.

ref may not be given for a state’s entry, do or exit action: the grammar writes no ref there. Passing one raises TypeError.

portion may not be given for a state’s entry, do or exit action: the grammar writes no portion kind there. Passing one raises TypeError.

A state has at most one action in each of the entry, do and exit positions. 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; owner must be one of the kinds admitting it (see above). "entry": the entry send ...; member form, under a StateSubactionMembership. "do": the do send ...; member form, under a StateSubactionMembership. "exit": the exit send ...; member form, under a StateSubactionMembership.

  • 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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • payload – What the action sends, written after send: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the action’s payload argument.

  • sender – The via clause: what the payload is sent via, as an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)). None omits the clause; the grammar requires via, to, or both.

  • receiver – The to clause: what the payload is sent to, as an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)). None omits the clause; the grammar requires via, 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 constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 a FeatureMembership.

owner may not be a syside.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.ViewpointUsage or syside.WhileLoopActionUsage: no terminate action usage can be written in their bodies. Passing one raises TypeError.

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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: 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 to ref(...) / literal(...)), instantiated as the node’s terminated-occurrence argument. None terminates the performing occurrence itself, the bare terminate; form.

Returns:

The new syside.TerminateActionUsage.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 a FeatureMembership.

owner may not be a syside.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.ViewpointUsage or syside.WhileLoopActionUsage: no while loop action usage can be written in their bodies. Passing one raises TypeError.

The { ... } body is created empty: reach it through get_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 the variant members it can be bound to.

  • metadata – The # prefixes of the declaration: each metaclass becomes one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • direction – The direction keyword before the usage: In, Out or Inout. None, the default, writes none.

  • derived – The derived prefix: the usage’s values can always be computed from the values of other features (KerML 8.3.3.3.4).

  • constant – The constant prefix: 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 individual prefix: the occurrence is an individual, defined by an individual definition (SysML 8.3.9.4).

  • ref – The ref prefix: the usage is a reference, not composite, so its values may outlive the featuring occurrence (SysML 7.6.3). False writes 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. A syside.PortionKind member is taken as the keyword of its name. None, the default, writes none.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • condition – The condition written after while: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the loop’s condition argument. None writes the loop { ... } form, which has no condition.

  • until – The until clause after the body: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the loop’s until argument. None omits the clause.

Returns:

The new syside.WhileLoopActionUsage.

Raises:
  • TypeError – If owner’s kind is not admissible; the message names the admissible kinds.

  • TypeError – If constant is given with portion: a portion never varies over time (KerML 7.3.4).

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If direction is not a syside.FeatureDirectionKind.

  • ValueError – If portion is neither None, "snapshot", "timeslice" nor a syside.PortionKind member.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 owner has a subject of its own, this parameter comes before the inherited subject, which validation reports: the subject must be the first input (validateRequirementUsageSubjectParameterPosition and its requirement definition and case counterparts). A subject added later, by new_subject() or syside.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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

Returns:

The new syside.PartUsage.

Raises:
  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 shorthand assume <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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written 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 by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • 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 to ref(...) / literal(...)).

Returns:

The new syside.ConstraintUsage.

Raises:
  • TypeError – If both equals and result are given: a value and a result expression together have no stated meaning.

  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 shorthand frame <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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written 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 by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

Returns:

The new syside.ConcernUsage.

Raises:
  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

Returns:

The new syside.RequirementUsage.

Raises:
  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 shorthand render <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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written 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 by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

Returns:

The new syside.RenderingUsage.

Raises:
  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 shorthand require <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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written 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 by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

  • 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 to ref(...) / literal(...)).

Returns:

The new syside.ConstraintUsage.

Raises:
  • TypeError – If both equals and result are given: a value and a result expression together have no stated meaning.

  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 owner has a subject of its own, this parameter comes before the inherited subject, which validation reports: the subject must be the first input (validateRequirementUsageSubjectParameterPosition and its requirement definition and case counterparts). A subject added later, by new_subject() or syside.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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

Returns:

The new syside.PartUsage.

Raises:
  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 (validateRequirementUsageSubjectParameterPosition and 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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • references – The ::>/references clause: the feature becomes the one ReferenceSubsetting a feature may own. A feature, or a chain() of two or more features.

  • multiplicity – The [...] clause, built by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

Returns:

The new syside.ReferenceUsage.

Raises:
  • ValueError – If default or initial is given without equals: each describes the value.

  • ValueError – If owner is a satisfy requirement usage with a by clause, which is its subject already: a requirement usage has at most one (validateRequirementUsageOnlyOneSubject).

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 shorthand verify <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 one MetadataUsage typed by it, written #M before the keyword (after end on an end usage).

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

  • defined_by – The :/defined by clause: each type becomes one FeatureTyping.

  • subsets – The :>/subsets clause: each entry becomes one Subsetting. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written by joining them.

  • redefines – The :>>/redefines clause: each entry becomes one Redefinition. An entry is a feature, or a chain() of two or more features standing for the feature chain a.b written 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 by bounds(): bounds(4) writes [4], bounds(1, INFINITY) writes [1..*].

  • ordered – The ordered keyword: the feature’s values are ordered.

  • nonunique – The nonunique keyword: the feature’s values may repeat.

  • equals – The = clause: an ExpressionTemplate, a bare model element, or a Python primitive (the latter two are canonicalized to ref(...) / literal(...)), instantiated as the usage’s feature value. None leaves the usage without a value expression.

  • default – The default keyword before the value: equals is a default value, which a redefinition may override, where a plain value is fixed. part def D { attribute x default = 1; }. Needs equals=.

  • initial – := in place of =: equals is 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 (KerML validateFeatureValueIsInitial); elsewhere validation reports it. part def D { attribute x := 1; }. Needs equals=.

Returns:

The new syside.RequirementUsage.

Raises:
  • ValueError – If default or initial is given without equals: each describes the value.

  • TypeError – If visibility is not a syside.VisibilityKind.

  • TypeError – If an entry of metadata is neither a syside.Metaclass nor a syside.MetadataDefinition.

  • TypeError – If an entry of defined_by is no syside.Classifier: a feature or a feature chain is no type of a usage (SysML 8.3.6.4).

  • TypeError – If multiplicity is not a template built by bounds().

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 a Membership.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no alias can be written in their bodies. Passing one raises TypeError.

An alias creates no element: for_ keeps its own owner, and this adds a name for it in owner. The returned Membership is what carries the name – reading it back is get_name on 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 in owner.

  • short_name – The abstract syntax’s memberShortName: the <...> short name the alias gives the element in owner.

  • visibility – The visibility indicator before the member. None, the default, writes no indicator, and the member is public.

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 visibility is not a syside.VisibilityKind.

new_expose(owner: syside.ViewUsage, imported: syside.Membership, *, recursive: bool = ..., filters: None = ...) → syside.MembershipExpose

Create expose <imported> [::**];. Create expose <imported>::* [::**];. Create expose <imported> [::**] [<filters>];.

An expose is an import a view usage owns (SysML validateExposeOwningNamespace): what is exposed keeps its own owner, and the view’s exposed_element is derived from its exposes. The textual syntax states no visibility and no all: validateExposeVisibility and validateExposeIsImportAll fix them to protected and True, which is how the expose is created. The target’s type selects the produced kind, as for new_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’s owning_membership (expose P::X;) – or a Namespace, 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 an ExpressionTemplate, a bare model element, or a Python primitive, and becomes one ElementFilterMembership of the anonymous package the import then imports, in the order given. None builds the unfiltered import.

Returns:

The new expose – a syside.MembershipExpose for a membership, a syside.NamespaceExpose for a namespace or with filters – the expose itself, not what it exposes.

Raises:

ValueError – If filters is 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 a Membership.

owner may not be an syside.ExhibitStateUsage, syside.FlowDefinition, syside.FlowUsage, syside.ForLoopActionUsage, syside.IfActionUsage, syside.StateDefinition, syside.StateUsage, syside.SuccessionFlowUsage or syside.WhileLoopActionUsage: no initial node can be written in their bodies. Passing one raises TypeError.

An initial node creates no element and no succession: for_ keeps its own owner, and a following then member (new_succession) is what orders the body. The returned Membership is 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 from Actions::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 is public.

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 visibility is not a syside.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 imported a syside.Membership, the new membership import goes in owner, through a MembershipImport.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no membership import can be written in their bodies. Passing one raises TypeError.

With imported a syside.Namespace, the new namespace import goes in owner, through a NamespaceImport.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no namespace import can be written in their bodies. Passing one raises TypeError.

With filters given, the new namespace import goes in owner, through a NamespaceImport.

owner may not be a syside.ConjugatedPortDefinition, syside.EnumerationDefinition, syside.ForLoopActionUsage, syside.IfActionUsage or syside.WhileLoopActionUsage: no namespace import can be written in their bodies. Passing one raises TypeError.

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) for import P::X;, the namespace itself for import 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’s owning_membership (import P::X;) – or a Namespace, 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, and private is the KerML default.

  • import_all – The all keyword after import: 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 an ExpressionTemplate, a bare model element, or a Python primitive, and becomes one ElementFilterMembership of the anonymous package the import then imports, in the order given. None builds the unfiltered import.

Returns:

The new import – a syside.MembershipImport for a membership, a syside.NamespaceImport for 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 filters is empty: the grammar requires at least one.

  • TypeError – If visibility is not a syside.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 parser list stays empty: nothing is re-parsed).