Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#720 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
compilers

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Go
スター
24
フォーク
5
平均マージ
10時間 11分
マージ済み PR(30日)
572

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Open-MBEE/OpenSysML のほかの issue

Open-MBEE/OpenSysML の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。