this in a part-owned action resolves to the action performance instead of the owning part
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with the minimal model in bug.sysml and reproduce the issue using %load, %instantiate p, and %features p.a. Trace how this is resolved for the owned action a, using the quoted SysML rules as the expected behavior. Done means ctx resolves to owning part p and the type-mismatch error no longer occurs.
Written by the indexing model from the issue text.
Description
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
thisreference of aownedActionis always its owning Part."
Same document, §8.4.13.2 (Action Usages — "Semantics of this"):
"... the value of
thisis 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: ee54ea03ea3ca8fb2c796ecda364adf748c40304 Build time: 2026-09-25_01:12:11 Go version: go1.25.0
- Dominant language
- Go
- Stars
- 24
- Forks
- 5
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 598
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Open-MBEE/OpenSysML
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Open-MBEE/OpenSysML#729 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
All issues in Open-MBEE/OpenSysML
Similar issues
-
[Docs] - Document minimum Terraform/OpenTofu version (>= 1.11) required by write-only argumentsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
MagaluCloud/terraform-provider-mgc#323 ·
Maintainers usually reply within 11 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
rossoctl/context-guru#366 ·
Maintainers usually reply within 1 day
-
stage-fail
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
siyuan-note/bazaar#2293 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
piraeusdatastore/piraeus-operator#1070 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day