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

Inherited succession guards resolve shadowed names in the specialization's action frame

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

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

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

評価

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

調査の方向性

Start with EvalContext.Lookup in internal/exec/runtime/action_frame.go, which reads the action frame before scope resolution, and with ActionGraph.declaredIn from lowering. The fix changes how frame cells are keyed, so it touches several subsystems named in the issue, not one file. Done means the Base/Derived example yields c = 1, explicit redefinition still yields c = 0, and the checker, exploration, SMT and read-set paths agree.

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

説明

An inherited succession guard reads names through the specialization's action frame, so a feature that a specialization declares with the same simple name as a feature of its general hides the general's feature from the inherited guard.

action def Base {
    attribute go : Boolean = true;
    attribute c : Integer := 0;
    first start;
    then action a;
    first a if go then b;
    action b { assign c := 1; }
}
action def Derived :> Base {
    attribute go : Boolean = false;
}

Performing Derived gives c = 0. The guard go was written in Base, so name resolution in its declaring scope gives Base::go and the expected result is c = 1. The checker already warns that Derived::go duplicates an inherited member name; explicit redefinition (attribute :>> go = false;) is a different case and correctly gives c = 0.

Cause. Lowering records the scope each inherited succession was declared in (ActionGraph.declaredIn), but the runtime evaluates guards against action-frame values that are keyed by canonical simple name (internal/exec/runtime/action_frame.go). EvalContext.Lookup reads the frame before scope resolution, so Base::go and Derived::go share one cell. Passing the declaring scope to guard evaluation alone does not change the result.

Fix direction. Key action-frame cells by declaration identity (or a resolved feature handle) rather than by simple name, then evaluate inherited guards in their declaring scope consistently across runtime, checker, exploration, SMT, read sets and model-form views.

主要言語
Go
スター
39
フォーク
12
平均マージ
14時間 26分
マージ済み PR(30日)
764

環境構築

はじめの一歩

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

Open-MBEE/OpenSysML のほかの issue

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

似ている issue

Go の issue をもっと見る

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

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