Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Function signatures aren't available during `Text2Abstract` on function definitions

Aperta
#663 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
wasm
Ambito
compilers

Direzione di ricerca

Inizia in pykwasm/kdist/wasm-semantics/wasm-text.md, in corrispondenza dell’invocazione di t2aDefns intorno alle righe 837-849, quindi leggi le regole correlate intorno alle righe 883-888 e 1309-1325. Usa l’esempio func.wast con un tipo di funzione denominato e un parametro come caso di regressione. Il lavoro è completato quando le variabili locali denominate ricevono indici dopo i parametri della funzione e l’esempio non valuta più la variabile locale all’indice 0.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Some information about a module doesn't get passed down to one of the text2abstract operations that need it:
https://github.com/runtimeverification/wasm-semantics/blob/b353017e7178731daa12cba75dc81fd69e20a81f/pykwasm/src/pykwasm/kdist/wasm-semantics/wasm-text.md?plain=1#L837-L849

On line 839, t2aDefns is invoked on the functions of the module with the context C. However, this context doesn't contain the signatures for the types in the module, only their ids. So, when t2a goes to calculate the indices of the variables in a function body, it doesn't have the function parameters for named types.

Here's an example from the wasm tests func.wast that fails because of this:

(module
  (type $sig (func (param i32) (result i32)))

  (func (export "f") (type $sig)
    (local $var i32)
    (local.get $var)
  )
)

(assert_return (invoke "f" (i32.const 42)) (i32.const 0))

$var here is assigned index 0. But, it should be 1, as the (param i32) in the function signature is at index 0 already. So, when "f" gets invoked, (local.get 0) is evaluated and returned, which is where the 42 that was passed in is at.

Relevant rules:

https://github.com/runtimeverification/wasm-semantics/blob/b353017e7178731daa12cba75dc81fd69e20a81f/pykwasm/src/pykwasm/kdist/wasm-semantics/wasm-text.md?plain=1#L883-L888

https://github.com/runtimeverification/wasm-semantics/blob/b353017e7178731daa12cba75dc81fd69e20a81f/pykwasm/src/pykwasm/kdist/wasm-semantics/wasm-text.md?plain=1#L1309-L1325

Lingua principale
WebAssembly
Stelle
106
Fork
24
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di runtimeverification/wasm-semantics

Tutte le issue di runtimeverification/wasm-semantics

Issue simili

Altre issue su Compilers

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.