2022-07 - SysML v2 Pilot Implementation
This is an incremental update to the 2022-06 release. It corresponds to Eclipse plugin version 0.26.0.
Language Features
The notation for a number of kinds of elements has been extended to allow them to have bodies ({
...}
).
[PR #381]
KerML
-
Relationships. The
relationship
notation has be extended to allow any kind of element to be declared as an owned related element of a relationship, not justelement
declarations and annotations. In addition, the following relationship notations have also been extended to allow similar relationship bodies.- import
- alias
- specialization (including subclassification, subsetting and redefinition)
- conjugation
- disjoining
- inverting
- featuring
-
Multiplicities. The
multiplicity
declaration notation can now have a full feature body.
SysML
-
Relationships. The import, alias and dependency notations have been extended to allow bodies, but these bodies can only contain annotations (comments, documentation, textual representation or metadata).
-
Action body elements. The following notations (used within action definitions and actions usages) can now have full usage bodies.
- Guarded successions (
first
sourceName
if
condition
then
targetName
;
) - Target successions (
then
targetName
;
andif
condition
then
targetName
;
) - Control nodes (
fork
,join
,decision
,merge
)
- Guarded successions (
-
Transition usages. Within state definition and usage bodies, transition usages can now have full action bodies.
Model Libraries
Kernel Libraries
-
Subdirectories. The Kernel Libraries directory has been reorganized into three subdirectories:
- Kernel Semantic Library – Library models that provide the base types for required implicit specializations in KerML user model constructs, plus additional semantic models for more advanced capabilities (such as state-based behavior, etc.).
- Kernel Data Type Library – Library models of standard data types that can be used in user models.
- Kernel Function Library – Library models of standard functions that can be used in user models, including functions corresponding to all the operators in the KerML expression syntax.
[PR #384]
-
Local clocks.
- Clocks. The singleton
defaultClock
feature has been renamed touniversalClock
. The defaults for theclock
parameters of theTimeOf
andDurationOf
functions have been changed fromdefaultClock
tolocalClock
(see below). - Occurrences. A
localClock
feature has been added toOccurrence
that defaults toClocks::universalClock
. ThelocalClock
of anOccurrence
is passed down as the default for each of its composite suboccurrences. - SpatialFrames. The defaults for the
clock
parameters of various functions in this package have been changed fromdefaultClock
toframe.localClock
. - Triggers. The defaults for the
clock
parameters ofTriggerAt
andTriggerWhen
have been changed fromdefaultClock
tolocalClock
.
[PR #382]
- Clocks. The singleton
Domain Libraries
-
Local clocks.
- Time. The singleton
defaultClock
part has been renamed touniversalClock
. The defaults for theclock
parameters of theTimeOf
andDurationOf
calculation definitions have been changed fromdefaultClock
tolocalClock
. - SpatialItems. The existing declaration of
localClock
forSpatialItem
has been updated to redefineOccurrences::localClock
and default toTime::universalClock
.
[PR #382]
- Time. The singleton
The above updates for local clocks allow, for example, the following:
part context {
// This defines a local clock used by default within the “context” part.
part :>> localClock = Time::Clock();
state behavior {
entry; then S1;
state S1;
transition
first S1
// The time instant in the trigger is, by default,
// relative to context::localClock.
accept at Time::Iso8601DateTime("22-05-12T00:00:00")
then S2;
state S2;
}
}
Backward Incompatibilities
The following textual notations have been removed, because they are considered to have become redundant or unnecessary as the notation has evolved.
[PR #381]
-
Logical operators. For certain Boolean operators, the expression notation currently includes both operator symbols (adapted from C/Java expression syntax) and equivalent operator keywords (introduced later). This release removes the operator symbols in favor of the keywords.
Removed Retained !
not
&&
and
||
or
^^
xor
=>
implies
... ? ... : ...
if
... ? ...
else
...
Note that the pure logical operators
&
and|
have also been retained. -
Parameter declaration. The textual syntax previously allowed for a parenthesized functional notation for declaring the parameters of a behavioral element (e.g., behaviors and steps in KerML and action definitions and usages in SysML), similarly to how parameters are declared in many programming languages. However, in KerML and SysML, parameters are simply directed features of behavioral elements which can also be declared in the body of a behavioral element. This release removes the parenthesized notation in favor of consistently using the same directed feature declaration syntax used for structural elements (e.g., ports).
Previously allowed
action def A ( x : T1, out y : T2 ); calc def B ( x : T1; ) return : T2;
Alternative using directed features
action def A { in x : T1, out y : T2 } calc def C { in x : T1; return : T2; }
Note that the direction must be provided when declaring a parameter as a directed feature (unlike the special parameter notation, in which
in
was the default), otherwise the feature will not be directed and not considered a parameter. Parenthesized functional notation is can still be used for invoking a function or calculation in an expression, e.g.,C(t1)
. -
flow from
shorthand. The textual notation previously allowed for aflow from
shorthand on a usage declaration, for a flow connection into that usage, similar to the feature value shorthand for a binding. This has been eliminated. -
Prefix comments. Previously, a comment starting with
/**
(i.e., with two stars instead of one) was parsed as a "prefix comment", which was automatically about the lexically following element in a namespace body. This notation has been eliminated in favor of using a documentation (doc
) comment nested in the body of the element being annotated. In order to allow this more generally, the textual syntax has also been extended to allow bodies on elements that where not able to have them before (see "Language Features" above).(For this release only, the previous prefix comment notation will generate a warning that the notation is no longer supported. This warning will be removed in the next release, at which point the notation will simply parse as a regular comment without any warning.)
Jupyter
None.
Visualization
- PlantUML
- Feature values whose value expression is a feature reference or a feature chain are now visualized as binding connectors on interconnection and action views.
[PR #379]
- Feature values whose value expression is a feature reference or a feature chain are now visualized as binding connectors on interconnection and action views.
- Tom Sawyer
- Fixed the visualization of connectors on structural interconnection diagrams.
Technical Updates
- Derived properties. The implementation for all derived properties has been moved from handwritten, in-line method code in metamodel
Impl
classes into separate delegate classes, using the Eclipse "setting delegate" mechanism.
[PR #380]
Bug Fixes
- State and state transition performances. Errors in the Kernel Library models for
StatePerformance
andStateTransitionPerformance
have been corrected.
[PR #383]