il2al: host function rules become two independent conditionals and ignore the new store `s'`
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- ocaml, wasm
- Ambito
- compilers
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- WebAssembly
- Stelle
- 3.5k
- Fork
- 540
- Merge medio
- 1g 6h
- PR unite (30g)
- 20
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di WebAssembly/spec
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
WebAssembly/spec#2258 · 4 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
[js-api] A mutable global import allocates a const global before LinkErrorForse già presa @chicoxyzzy l’ha presa 12 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
WebAssembly/spec#2253 ·
I maintainer di solito rispondono entro 1 giorno
-
[spectec] Wasm 1.0: `$instantiate` missing premisesForse già presa @rossberg l’ha presa 38 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
WebAssembly/spec#2245 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
WebAssembly/spec#2235 · 9 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
WebAssembly/spec#2196 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di WebAssembly/spec
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
flang
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
llvm/llvm-project#233097 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
A binding pattern element named `from` or `as` fails with "Expected destructuring pattern": `const [from] = [1]`, `const { a: from } = o`, `([from]) => from`Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug engine spec compliance
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
frostney/GocciaScript#1737 ·
I maintainer di solito rispondono entro 1 giorno