il2al: host function rules become two independent conditionals and ignore the new store `s'`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- ocaml, wasm
- 領域
- compilers
調査の方向性
The two host-function rules are in spectec/specification/wasm-3.0/4.3-execution.instructions.spectec around lines 184-198. The translation that emits Either only for condition-free rules is in spectec/src/il2al/translate.ml near line 1155, so start there and compare with how memory.grow is handled. Done means the RES and BOT cases become mutually exclusive alternatives, and the store s' from the RES case is applied, as checked by the --prose output.
索引モデルが issue の本文から書いたものです。
説明
I came across this while looking at how il2al uses Either for nondeterminism.
The rules Step/call_ref-hostfunc-res and -div (added in #2210) can both apply:
--prose gives:
13. If an element of $hostcall((_HOSTFUNC hf), s, val^n) is some RES, then:
a. Let (RES s' result) be an element of $hostcall((_HOSTFUNC hf), s, val^n).
b. Execute the sequence $lift_result(result).
14. If BOT is contained in $hostcall((_HOSTFUNC hf), s, val^n), then:
...
- Steps 13 and 14 are not alternatives, so when both apply the algorithm does both.
s'is never used, so the store is not updated.
I would expect something like this, as for memory.grow (not sure how AL should update the whole store):
13. Either:
a. Let (RES s' result) be an element of $hostcall((_HOSTFUNC hf), s, val^n).
b. Update the store s to s'.
c. Execute the sequence $lift_result(result).
14. Or:
...
It seems il2al produces Either only for rules without conditions (translate.ml#L1155).
Note: This might be low priority since neither the document nor the reference interpreter uses this algorithm.
- 主要言語
- WebAssembly
- スター
- 3.5k
- フォーク
- 540
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 20
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WebAssembly/spec のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
WebAssembly/spec#2258 · コメント 4 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[js-api] A mutable global import allocates a const global before LinkError対応中かも @chicoxyzzy が 12 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
WebAssembly/spec#2253 ·
メンテナーはふだん 1 日以内に返信
-
[spectec] Wasm 1.0: `$instantiate` missing premises対応中かも @rossberg が 39 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
WebAssembly/spec#2245 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
WebAssembly/spec#2235 · コメント 9 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
WebAssembly/spec#2196 ·
メンテナーはふだん 1 日以内に返信
WebAssembly/spec の issue をすべて見る
似ている issue
-
`lvm_compact` has no self-hosted twin, and `docs/158` §5 says every language-face component mustオープンbug sev-3 vm
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
Bisect issue233157オープンbisect
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
dtcxzyw/llvm-bisect-service#545 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信