il2al: host function rules become two independent conditionals and ignore the new store `s'`
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- ocaml, wasm
- Área
- compilers
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- WebAssembly
- Estrellas
- 3.5k
- Forks
- 540
- Merge medio
- 1 d 6 h
- PR fusionados (30 d)
- 20
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de WebAssembly/spec
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
WebAssembly/spec#2258 · 4 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
[js-api] A mutable global import allocates a const global before LinkErrorPosiblemente ocupada @chicoxyzzy la tomó hace 12 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
WebAssembly/spec#2253 ·
Los mantenedores suelen responder en 1 día
-
[spectec] Wasm 1.0: `$instantiate` missing premisesPosiblemente ocupada @rossberg la tomó hace 38 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
WebAssembly/spec#2245 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
WebAssembly/spec#2235 · 9 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
WebAssembly/spec#2196 ·
Los mantenedores suelen responder en 1 día
Todos los issues de WebAssembly/spec
Issues similares
-
bug engine spec compliance
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
frostney/GocciaScript#1737 ·
Los mantenedores suelen responder en 1 día
-
bug frontend rt sev-3
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
area:adapters duckdb engine:v2 status:triage triage type:bug v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
Bisect issue232859Abiertobisect
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
dtcxzyw/llvm-bisect-service#529 · 1 comentario ·