Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

this in a part-owned action resolves to the action performance instead of the owning part

Open
#720 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
compilers

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

bug
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: 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Open-MBEE/OpenSysML

All issues in Open-MBEE/OpenSysML

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.