Wasm-DSL / spectec

Wasm SpecTec specification tools
https://wasm-dsl.github.io/spectec/
Other
27 stars 9 forks source link

Usage of undeclared metavariable in spec #97

Closed 702fbtngus closed 5 months ago

702fbtngus commented 5 months ago

I found that undeclared metavariable is used in the spec. For example,

https://github.com/Wasm-DSL/spectec/blob/b9b4c134d9ec23d82b2c668b37f65ddf6b101752/spectec/spec/wasm-3.0/8-reduction.watsup#L220C1-L222C54

here, the binop used in (BINOP nt binop) is not declared as metavariable nor syntax. Is it expected behavior to use an undeclared metavariable or error which should be fixed?

rossberg commented 5 months ago

Yes, the frontend can now infer variable types in suitable (not all) situations. This became necessary, because global declarations are not possible when indexed types come into play, and requiring local declarations everywhere would be extremely tedious.

702fbtngus commented 5 months ago

Oh, I understand. Thank you. :)