Model and observed behaviour
Minimal model (`bug.sysml`), on sysml v0.9.0 (Windows):
// Written in file: bug.sysml
action def A {
ref part ctx : P;
}
part def P {
action a : A {
:>> ctx = this;
}
}
part p : P;
Command:
sysml> %load bug.sysml
sysml> %instantiate p
sysml> %features p.a
Output:
Instance: p.a (ID: 2)
Features:
ctx: <error: feature value a.ctx: type mismatch: cannot write instance(2) (instance) to a feature typed by P>
`instance(2)` is the performance of action `a` itself (i.e. `p.a`), not `p`. So
`a.this` resolved to the action, and `:>> ctx = this` tried to write the action into a
`P`-typed feature.
What the specification requires
a is an ownedAction of part p, so a.this must be p; :>> ctx = this should
set ctx to p, with no error.
OMG SysML v2.0 (formal/2026-03-02), Part 1, §9.2.4.2.1 (Part):
"The this reference of a ownedAction is always its owning Part."
Same document, §8.4.13.2 (Action Usages — "Semantics of this"):
"... the value of this is the top-level Action in the hierarchy ..., unless that
top-level Action is itself one of the ownedActions of a Part (or one of the
ownedPerformances of an Item), in which case the value is that Part (or Item)."
Kind of gap
Valid model is rejected (false positive)
Reference implementation
No response
Version
sysml v0.9.0 Commit: ee54ea0 Build time: 2026-09-25_01:12:11 Go version: go1.25.0
Model and observed behaviour
What the specification requires
ais anownedActionof partp, soa.thismust bep;:>> ctx = thisshouldset
ctxtop, with no error.OMG SysML v2.0 (formal/2026-03-02), Part 1, §9.2.4.2.1 (Part):
Same document, §8.4.13.2 (Action Usages — "Semantics of this"):
Kind of gap
Valid model is rejected (false positive)
Reference implementation
No response
Version
sysml v0.9.0 Commit: ee54ea0 Build time: 2026-09-25_01:12:11 Go version: go1.25.0